memcached - How to periodically set a global variable in django -


so want have feature like: "random post of hour" website, post object model.

having db choose random post per request can expensive don't want pick row on every request. don't mind if different users have different "random post of day".

i go , cache query, getting memcache involved feels hacky overkill. creating table , job 1 value.

is there way have global variable periodically set in django?

thank you!

went eduardo's solution use memcached: https://docs.djangoproject.com/en/1.3/topics/cache/#the-low-level-cache-api


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -