Getting Started
Getting Started
This guide will help you quickly get TagCache up and running on your system.
What is TagCache?
TagCache is a high-performance, sharded, tag-aware in-memory cache server written in Rust that offers:
- JSON HTTP API (port 8080) - RESTful interface for web applications
- TCP Protocol (port 1984) - Ultra-low latency binary protocol
- Tag-based Invalidation - Organize and clear related data efficiently
- Atomic Operations - ADD, INCR, DECR with race-condition protection
- Built-in Web Dashboard - Beautiful React UI for monitoring and management
Quick Installation
Choose your preferred installation method:
macOS/Linux via Homebrew (Recommended)
| |
Download Pre-built Binary
| |
Docker
| |
Starting the Server
Start TagCache with default settings:
| |
You should see output like:
π TagCache v1.0.8 starting...
π§ Config: /path/to/tagcache.conf
π HTTP Server: http://0.0.0.0:8080
β‘ TCP Server: 0.0.0.0:1984
π Authentication: enabled (user: admin)
β
Server started successfully!Default Credentials: Username:
admin, Password: password
Change these in production!First Steps
1. Access the Web Dashboard
Open your browser to http://localhost:8080
The web dashboard provides:
- Real-time server statistics
- Key-value browser and editor
- Performance monitoring
- Cache management tools
2. Basic CLI Operations
Test the CLI with basic operations:
| |
3. HTTP API Examples
Test the HTTP API with curl:
| |
Configuration
TagCache uses a configuration file located at:
- Linux:
/etc/tagcache/tagcache.conf - macOS:
/opt/homebrew/etc/tagcache.confor/usr/local/etc/tagcache.conf - Windows:
C:\ProgramData\tagcache\tagcache.conf
Basic configuration:
| |
What’s Next?
Complete installation guide for all platforms
Configure TagCache for your needs
Complete API documentation
Real-world usage examples
Common Use Cases
- Session Storage: Store user sessions with automatic expiration
- API Response Caching: Cache expensive API responses with tag-based invalidation
- Rate Limiting: Use atomic counters for request rate limiting
- Database Query Caching: Cache query results and invalidate by related tags
- Real-time Analytics: Store and aggregate metrics data
Production Usage: Don’t forget to change the default credentials and configure proper authentication for production deployments!