3

I am trying to create & store custom cache using script in magento 1. Is their any way we can implement it ?

1

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
| improve this answer | |
  • Thankyou for the answer, but i also want to store data in it. – Hamendra Sunthwal Jul 10 at 5:40
  • wait am putting a source link in my ans now checkout the links – Chikku Jul 10 at 5:42
  • Let me try into script :) – Hamendra Sunthwal Jul 10 at 5:45
  • yeah sure give it a try – Chikku Jul 10 at 5:47
  • @Chiiku How can i make sure that custom cache is created & stored ? – Hamendra Sunthwal Jul 10 at 5:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.