I have few question where I am confused about the server side cache in PHP. I am using Yii2 to set MemCache. And my question are:-
1.How can I get expire time of cache variable with id?
\Yii::$app->cache->set('cacheId',$counter,$expireTime); //set cache with id cacheId
2.If I set same cache id/ overwrite cache id without $expireTime. It will take default expire time or from before?
\Yii::$app->cache->set('cacheId',\Yii::$app->cache->get(cacheId)+1); //overwrite cachewith id cacheId.
Code looks are in Yii2 but my question is related to server side cache mechanism in PHP.
Thanks You.