valnet / valuenetwork

Resource Planning and Value Accounting for Value Networks
http://mikorizal.org
GNU Affero General Public License v3.0
99 stars 25 forks source link

cached events are causing problems again #463

Open bhaugen opened 8 years ago

bhaugen commented 8 years ago

Deleted contributions are not getting removed from the cache. This might be deleted via admin, or it might be in general.

Short term: restart the cache. Medium term: rethink the cache.

sqykly commented 6 years ago

Did you end up fixing this? Is there a custom cache someplace or would this involve hacking django or the server settings? Where can the deleted events get? Show up in querysets? Primary keys referenced by other objects?

bhaugen commented 6 years ago

This is about CachedEventSummary https://github.com/valnet/valuenetwork/blob/master/valuenetwork/valueaccounting/models.py#L11664

I rebuilt the cache using the summarize_all_events class method using shell_plus on the server, which I have done a few times. Have not rethunk the cache.

This is used for the diagrams on collective agent pages, because otherwise they were too slow. Occasionally people have seen errors in the diagrams. That's when I have rebuilt the cache

sqykly commented 6 years ago

Are they sitting in the cache indefinitely? It seems like that would compromise the integrity of those diagrams, but as long as the primary keys never show up in, say, the queryset of a form field that is getting posted back and saved, it should have a limited impact on the integrity of the whole system.

bhaugen commented 6 years ago

CachedEventSummary is just another table in the database. It is not like memcache etc.