Joomla Cache Jcache

Source: Internet
Author: User
Joomla caches data via Jcache:

//调用Cache,参数'com_campaign'为缓存组,必须!$cache= JFactory::getCache('com_campaign','');//设置:即使关闭全局缓存时,此缓存仍有效$cache->setCaching(true);//设置缓存时间,此处设置为 60s$cache->setLifeTime(60);//获取缓存$name=$cache->get('userid_101');if(!$name){ $str='my name is cache'; //设置缓存$cache->store($str,'userid_101');}echo '
';print_r($name);exit;//移除缓存$cache->remove('userid_101');//获取全部缓存对象列表及简介$cache->getAll();//清除缓存组。第二个参数为:group|notgroup 默认为group。notgroup不知道是干什么的$cache->clean('com_campaign','group');

Reference Address:
Https://api.joomla.org/cms-3/classes/JCache.html
Https://docs.joomla.org/API15:JCache

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the Joomla cache Jcache, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.