outofculture / django-cached-field Goto Github PK
View Code? Open in Web Editor NEWCelery-deferred, cached fields on Django ORM for expensive-to-calculate data
License: Other
Celery-deferred, cached fields on Django ORM for expensive-to-calculate data
License: Other
Does django-cached-field in fact depend on django-celery? I don't notice at a glance any imports or settings used from it.
We could put a pre-save hook in that (locks the record and?) syncs the cached fields (and the recalc flags?).
This line in offload_cache_recalculation
fails with
ValueError: Unknown format code 's' for object of type 'int'
presumably with the obj_id
as the int
, and apparently you can't "{:s}".format(obj_id)
an int, even though you can totally "%s" % (obj_id,)
one.
You can, however, "{}".format(obj_id)
, it seems.
null-booleans are an anti-pattern. fix this.
Error fixed by PR #8 should have been caught by a set of basic tests if they existed.
E.g.
with Cache.hold_recalc():
# do a bunch of work here
# no recalculation should happen
# now we can recalc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.