Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $param = 'param1_value';
- $inCache = false;
- if (!$p = $modx->cacheManager->get('param1',array(xPDO::OPT_CACHE_KEY => 'minishop/goods_params'))) {
- $inCache = false;
- } else {
- $inCache = true;
- echo 'В кэше';
- }
- if (!$inCache) {
- $modx->cacheManager->set('param1',$param,0,array(xPDO::OPT_CACHE_KEY => 'minishop/goods_params'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement