chibisov / drf-extensions

DRF-extensions is a collection of custom extensions for Django REST Framework
http://chibisov.github.io/drf-extensions/docs
MIT License
1.47k stars 208 forks source link

Invalidation of cache not working #120

Open GerardPaligot opened 8 years ago

GerardPaligot commented 8 years ago

In advance, I'm sorry if it isn't the right place for this issue but I didn't find any IRC or mailing list to post my question/issue.

I use drf-extensions on an open-source project where we have private messages. Our API covers these private messages and we have specified a timeout of 15 minutes on our API.

Unfortunately, drf-extensions don't seem to invalidate the cache. If I create a message in a private message and request the list of messages, the cache is always activated and the system doesn't return the new message in the list.

auvipy commented 8 years ago

https://github.com/chibisov/drf-extensions/issues/119 same as this issue?

chibisov commented 8 years ago

Hi, could you show your view, route and settings source? If it's open source could you provide a link to it?

GerardPaligot commented 8 years ago

The open-source project is this one: https://github.com/zestedesavoir/zds-site. It is a french project. Documentation, issues and pull requests are in french but the code is in english.

You have a module for private message here with its api here. You can see all keys of the cache in the views.py file and its usage in views below in the file.

Maybe, we made something wrong to invalidate the cache?

auvipy commented 8 years ago

Try updating to drf 3.3.2

GerardPaligot commented 8 years ago

We are working on the migration to Django 1.9 and with that, the update to 3.3.2 for DRF.

As soon as it is done, I'll let you know here.

auvipy commented 8 years ago

ok. I'm also working on supporting 1.9 compat for drf-ext

GerardPaligot commented 8 years ago

Well, my open source project released a new version with Django 1.8, Django Rest Framework 3.3.3 and drf-extensions 0.2.8 but the bug is always present.

When I insert new data, the cache isn't invalidated.I must wait for the end of the cache configured on my view before getting new data.

egregors commented 7 years ago

opened this issue on 24 Dec 2015

I have the same problem. Any progress?