CI file cache used, can be used to implement multi-template switching

Source: Internet
Author: User

February 28, 2015 15:13:41

$thisArray(' adapter ' = ' file ');//Load Adapter
Please note that it is best to use the new version
$TPL = ' default ';

$this->cache->file->save (' template ', $TPL, 999);
$this->cache->file->save (' saved file name or id ', ' stored in value ', ' time of existence ');
Write a potentially large time can represent wireless
$template = $this->cache->get (' template ');//Get the value of the template
$this->cache->delete (' template ');//delete the template's cache file
Var_dump ($this->cache->cache_info ());//Get more information about all cached files
$this->cache->clean ();//delete all cached files
Var_dump ($this->cache->get_metadata (' template '));//Get more information about the cache of the template
can also be used to cache the cache for 7,200 seconds of key

A:3:{s:4: "Time"; I:1425107444;s:3: "TTL"; I:
999; s:4: "Data"; s:7: "Default";}


CI file cache used, can be used to implement multi-template switching

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.