Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

No intermediate Django cache? #34

Open
adamchainz opened this issue Sep 20, 2016 · 2 comments
Open

No intermediate Django cache? #34

adamchainz opened this issue Sep 20, 2016 · 2 comments

Comments

@adamchainz
Copy link
Owner

The time difference between a Model.objects.all() and cache.get on our database isn't particularly large, for example with gargoyle data:

In [13]: %timeit list(Switch.objects.all())
100 loops, best of 3: 2.71 ms per loop

In [14]: %timeit caches['gargoyle'].get('SwitchManager:Switch:key')
1000 loops, best of 3: 1.18 ms per loop

Why don't we just stop using Django's cache system? It's making misses a lot more complicated...

@adamchainz
Copy link
Owner Author

I think the best way to do this would be to drop modeldict and have a simple key-value cache object in gargoyle

@adamchainz
Copy link
Owner Author

@martino @vad

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant