try { // retrieve a value from cache $cached_value = \Cache::get('somevalue'); } catch (\CacheNotFoundException $e) { // not found in cache, construct the value $cached_value = 'some_value';
// and store it in cache for up to an hour \Cache::set('somevalue, $cached_value, 3600); }
Let's say you retrieve the value in the cache using \Cache::get().... Does this function reset the expiration of the cache? Also, is the expiration based on the files "modified" time, "created_at" or some internal value managed by fuelphp? Basically, I want to know what parameters to look for when performing a cron job. -thanks!