1👍
✅
After trying and testing for a week (thanks to my team) ,I have realised that Django low level Apis is good for getting an edge over database fetching but not for serious caching performance.
A Django middleware class is only instantiated once in middleware stack throughput server process. As mentioned in Django official docs and django book.
On using low level apis probably the connection initiation to Memcache was taking too much time.
Finally I inherited FetchfromCache middleware and created my own custom middleware which is giving same performance as 2 part middleware of Django. Stripping down unwanted middlewares also really help in performance boost.
Source:stackexchange.com