First time here? Check out the FAQ!
1

Incorrect timestamps in the content displays
 

I have problems with incorrect (outdated) datetime stamps for questions when I am using memcached.

Fragment of settings.py:

CACHE_TIMEOUT = 10
CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': 'unix:/home/%username%/memcached.sock',
        'TIMEOUT': 10,
        'KEY_PREFIX': 'askbot'
    }
}

Could you provide me any solutions?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
alekcac's avatar
11
alekcac
asked 13 years ago
Evgeny's avatar
13.2k
Evgeny
updated 13 years ago

Comments

On main page http://askbot.org/en/questions/ I see that my question was asked 0 mins ago, when I open question page (http://askbot.org/en/question/6820/askbotmemcached) I see - 8 mins ago. Also sometimes on main page http://askbot.org/en/questions/ I see 0 views for my quesion and sometimes 1 views. Why does it happen?

alekcac's avatar alekcac (13 years ago)
see more comments

1 Answer

0

Yes, we have some issues with displaying dates, it is not a memcached issue - the cache appears to work correctly.

I think we will have to change to calculating the "time ago" type of information using javascript from a standard timestamp.

Most of these issues started showing up when we started caching harder to compute HTML fragments aggressively. The benefits are reduced database activity and faster response times, but we have to fix the edges like you've noticed.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 13 years ago
link

Comments

see more comments