I wish to write an extension to enable caching on certain read actions that define cached? true inside a read action.
How would I idiomatically proceed for the same in Ash? I wish to use Cachex for caching.
Ideally, I am thinking
use Ash.Resource, extensions: [MyCacheExtension]
...
actions do
read :read_by_id do
...
cached? true
end
end
or a separate cache block which could be more flexible.
cache do
activate_for :read_by_id , ttl: 3000 # ms
end






















