Updates to Mechanic's cache feature

  • All cache commands now support a "ttl" option, allowing users to define an expiration period other than the default (and maximum) of 60 days.
  • The "setex" command has been deprecated, in favor of using "set" with a "ttl" option.
  • The default expiration period behavior is now defined for all commands, not just "set" (and formerly "setex") – specifically, the expiration period is reset to 60 days whenever a key is updated, deferring to the "ttl" value if given.
  • Tasks may now iterate through all stored keys and values, using {% for keyval in cache %} to receive a tuple of each key and value pair.
  • Cached values are now limited to a size of 256KB each.

Read more