Documentation Index
Fetch the complete documentation index at: https://mintlify.com/owasp/nest/llms.txt
Use this file to discover all available pages before exploring further.
Overview
OWASP Nest uses django-redis to cache REST API responses in Redis. Caching reduces database load and speeds up responses for high-traffic list and detail endpoints.Cache configuration
The cache backend is configured insettings/base.py:
API_CACHE_TIME_SECONDS:
api-response prefix.
What gets cached
REST API responses
Every REST v0 endpoint is wrapped with the@cache_response() decorator from apps/api/decorators/cache.py. Responses are cached for 24 hours and keyed by the full request URL including query parameters.
This means the following are all cached independently:
GET /api/v0/projects/— first pageGET /api/v0/projects/?page=2— second pageGET /api/v0/projects/Nest— project detailGET /api/v0/chapters/?country=US— filtered list
GraphQL responses
GraphQL queries are not cached at the transport layer. TheDjangoOptimizerExtension from strawberry-graphql-django optimizes SQL queries to reduce database round-trips, but response-level caching is handled by the Next.js frontend (Apollo Client).
Cache invalidation
The cache is not automatically invalidated when data changes. To clear the cache manually:python manage.py clear_cache inside the nest-backend container.
Redis configuration
Redis is shared between the cache layer and the Django RQ task queue (on a separate Redis database index). Configure the Redis connection using these environment variables:| Variable | Description |
|---|---|
DJANGO_REDIS_HOST | Hostname of the Redis server |
DJANGO_REDIS_PASSWORD | Redis authentication password |
DJANGO_REDIS_AUTH_ENABLED | Whether Redis requires authentication (True/False) |
