I am trying to create & store custom cache using script in magento 1. Is their any way we can implement it ?
1 Answer
create your own cache type by declaring the following in your config.xml
<global>
<cache>
<types>
<custom translate="label,description" module="module">
<label>Custom Cache</label>
<description>This is my custom cacge</description>
<tags>CUSTOM_CACHE_TAG</tags>
</custom >
</types>
</cache>
</global>
Hope This Helps!
Update: For more details refer to this link https://magently.com/blog/custom-cache-in-magento/ Update:- Retrieving Data
Mage::app()->loadCache($id);
Deleting Cache
Mage::app()->removeCache($id);
Checking If Cache Is Enabled
Mage::app()->useCache('collection'); //check if cache group is enabled or not
-
Thankyou for the answer, but i also want to store data in it. Jul 10, 2020 at 5:40
-
-
-
-
@Chiiku How can i make sure that custom cache is created & stored ? Jul 10, 2020 at 5:52