1.

Explain the caching strategies in the Django?

Answer»

Caching refers to the technique of storing the output results when they are processed initially so that next time when the same results are fetched again, instead of processing again those already stored results can be USED, which leads to faster accessing as well us LESS resource utilization. DJANGO provides us with a robust cache system that is able to STORE dynamic web pages so that these pages don’t need to be evaluated again for each request. 

Some of the caching strategies in Django are listed below:

StrategyDescription
MemcachedA memory-based cache server is the fastest and most efficient
FileSystem CachingValues of the cache are stored as separate files in a serialized order
Local-memory CachingThis is used as the default cache strategy by Django if you haven’t set anything. It is per-process as well as thread-safe.
Database Caching Cache data will be stored in the database and WORKS very well if you have a fast and well-indexed DB server.


Discussion

No Comment Found