Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vedantwork/redis-cache-management
Redis Cache Management is a powerful and efficient caching solution designed to optimize data retrieval and application performance by leveraging the Redis in-memory data structure store. This component provides a streamlined approach to managing cached data, reducing latency, and minimizing load on backend databases or services.
https://github.com/vedantwork/redis-cache-management
django python redis redis-cache
Last synced: 27 days ago
JSON representation
Redis Cache Management is a powerful and efficient caching solution designed to optimize data retrieval and application performance by leveraging the Redis in-memory data structure store. This component provides a streamlined approach to managing cached data, reducing latency, and minimizing load on backend databases or services.
- Host: GitHub
- URL: https://github.com/vedantwork/redis-cache-management
- Owner: vedantwork
- Created: 2024-08-24T07:50:41.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-05T12:07:13.000Z (about 2 months ago)
- Last Synced: 2024-12-05T13:18:48.635Z (about 2 months ago)
- Topics: django, python, redis, redis-cache
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
REDIS CACHE MANAGEMENT
Optimized caching solution for Django applications using Redis
## đ Table of Contents
- đ About the Project
- đ Overview
- đ Built With
- đĨ Tech Stack
- đ Key Features
- đģ Getting Started
- đ Prerequisites
- âī¸ Setup
- âļī¸ Run Application
- đšī¸ Usage
- đĨ Author## đ About the Project
Redis Cache Management is a backend microservice integrated into a Django application, designed to optimize data retrieval and application performance by leveraging Redis as an in-memory data store. This service streamlines cache management, reduces latency, and minimizes load on backend databases.
## đ Overview
- The service provides methods to store (`setredisdata`), retrieve (`getredisdata`), and delete (`deleteredisdata`) cached data in Redis.
- It handles caching efficiently, storing responses for up to 45 days to reduce the need for repeated data fetching from the backend.## đ Built With
- Python
- Django
- Redis
- JSON### đĨ Tech Stack
- Django
- Redis### đ Key Features
- **Efficient Caching**: Caches data for up to 45 days to reduce backend load.
- **Data Retrieval**: Retrieves data from the cache, minimizing response time.
- **Cache Management**: Provides methods to set, get, and delete cache entries.## đģ Getting Started
### đ Prerequisites
To use this service, you will need:
- Python 3.x
- Django
- Redis server installed
- Required Python libraries: `django-redis`, `json`.### âī¸ Setup
1. **Clone the repository**:
```bash
git clone https://github.com/your-repo/redis-cache-management.git
```2. **Navigate to the project directory**:
```bash
cd redis-cache-management
```3. **Install the required dependencies**:
```bash
pip install -r requirements.txt
```4. **Configure Redis in Django**:
In your Django project's `settings.py`, add the following configuration:
```python
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/1",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
}
}
```5. **Start the Redis server**:
```bash
sudo service redis-server start
```### âļī¸ Run Application
1. **Run the Django development server**:
```bash
python manage.py runserver
```### đšī¸ Usage
1. **Set Data**: Use the `setredisdata` method to store data in Redis.
2. **Get Data**: Use the `getredisdata` method to retrieve cached data.
3. **Delete Data**: Use the `deleteredisdata` method to delete cache entries as needed.- [đĨ Author](#author)
- Vedant Vartak
- Email âī¸: [email protected]
- Country đ: India đŽđŗ**Example Usage**:
To set data in the cache, you can send a POST request to the `setredisdata` endpoint with the following payload:
```json
{
"key": "unique_key",
"value": {
"data": "your_data"
}
}