Ok , so here is what i did so far.
- Installed memcached through pip install.
- Added this to settings.py
CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', } }
- Then put a decorator
@cache_page(60*15)on a view i want to cache, but nothing changed. If i put time on a page, it updates every refresh , and if i add something to page through form it also appears as soon as it is added … Based on that info i conclude it does not cache the page.
Basically my parser adds every 3 hours new information , so i need to cash 1 time in 3 hours , exactly after parser insert all the data to the database. Did not figure how to do that yet, as even simple @cache_page does not work .
Maybe i messed something with configuring memcached ?
memcached server needs to be installed on your OS. I think the pip packages are just clients