Set a cache TTL for your partials and components

You can easily create a cached partials now using a ttl variable on your shortcuts.

{{ partial | my_partial_name | cache | ttl#10 }}

On this example a cache will be created on your git folder/cache directory. The cache will expire in 10s. It's very useful for fragment caching.

To remove the cache just wait for the TTL or clear the cache directory.

You can use it even with an arangodb dataset : 

{{ partial | all-products | arango | req#products#ttl#30 }}

Same thing for the components

{{ riot4 | account/account | source | ttl#60 }}

Leave a comment