3 ms·
I was curious to see an alternative to this, but how is this an alternative? You're saying I can implement my own caching of function calls that invalidates whe
by CGamesPlay 3y ago
I was curious to see an alternative to this, but how is this an alternative? You're saying I can implement my own caching of function calls that invalidates when the arguments or source code change...? These feel like entirely separate layers. Did I miss where diskcache does this stuff?
- nicwolff 3y agohttps://grantjenks.com/docs/diskcache/api.html#diskcache.Cache.memoize https://grantjenks.com/docs/diskcache/api.html#diskcache.Cac... Decorator to wrap callable with memoizing function using cache. Repeated calls with the same arguments will lookup result in cache and avoid function evaluation.
- williamzeng0 3y agoIt does feel like diskcache is for performance gains in production rather than dev time gains. It seems like it would be bothersome to quickly invalidate the cache in case of a bad write.