We have a challenging use-case involving creating animated countdown timers.
Timer animations are generated by a (separate) serverless function.
Timer definition is contained in the URL string - color, expiration date/time, and so on.
Caching of repeat requests with the -same- single param (the URL string) fails after the TTL.
We have a challenging use-case involving creating animated countdown timers. Timer animations are generated by a (separate) serverless function. Timer definition is contained in the URL string - color, expiration date/time, and so on.
Caching of repeat requests with the -same- single param (the URL string) fails after the TTL.
@cached(ttl=10) def fetch_count(url) ...
return image
fetch_counter(url)
cache hits mount up...but if, 15 seconds later...
fetch_counter(url) fetch_counter(url) fetch_counter(url)
according to cache_info(), there aren't any additional hits. TTL clearing doesn't appear to expunge the key (url string in this case).
Workaround with clock value shouldn't be too difficult, just thought you'd want to know.
Rgds