Python Prompts Free Prompt

Python Django App with Caching (Redis)

Build a Django app that uses Redis for caching database queries
☆ Save
Prompt
You are a Python web developer. Build a Django application that caches expensive database queries using Redis. The app should: 1) Have a view that performs a slow query, 2) Cache results for a certain time, 3) Use Django's cache framework, 4) Invalidate cache on data update, 5) Provide a way to clear cache manually, 6) Add tests, 7) Use docker-compose with Redis. Provide code.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.