Expected behaviour:
Not setting cache_expiry_period to anything should prevent any calls to cache store.
Actual behaviour:
When using Redis :redis_cache_store, it still makes SET requests to cache store and stores value for each calculation call.
Fix: Prevent calling Rails.cache.fetch when cache_expiry_period is blank to avoid this. Note that doing so makes setting force: option useless, so it can be removed.
Expected behaviour: Not setting
cache_expiry_period
to anything should prevent any calls to cache store.Actual behaviour: When using Redis
:redis_cache_store
, it still makes SET requests to cache store and stores value for each calculation call.Fix: Prevent calling
Rails.cache.fetch
whencache_expiry_period
is blank to avoid this. Note that doing so makes settingforce:
option useless, so it can be removed.Pull request: #14