Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7916159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:42:19+00:00 2026-06-03T14:42:19+00:00

I have to rewrite the core cache model. And this doesn’t work. My first

  • 0

I have to rewrite the core cache model. And this doesn’t work. My first attempt to solve the problem was to try the rewrite with another model…
In my config.xml I declared the following

<global>         
  <models>          
    <core>
      <rewrite>
        <**layout**>MyCompany_MyModule_Model_Core_Cache</**layout**>
      </rewrite>
    </core>
  </models>
  ....

and in my class I died in the consturctor.

This works perfectly!
So my may in rewriting models is the right one.

But If I don’t use the layout-node in the xml but using the cache-node instead this does not work.

So my attempt is the following and this is not working:

<global>         
  <models>          
    <core>
      <rewrite>
        <cache>MyCompany_MyModule_Model_Core_Cache</cache>
      </rewrite>
    </core>
  </models>
  ....

My question now: is there a way to rewrite / overload the “cache-core-model”???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:42:21+00:00Added an answer on June 3, 2026 at 2:42 pm

    I’m also trying to do the same thing and i don’t think it’s possible. If you var_dump out $this->_xml->group->models in the method: getGroupedClassName (app/code/core/Mage/Core/Model/Config.php) you’ll notice that your rewrite it’s not yet available, hence why it’s skipped.

    If you try to overwrite translate or layout: your_class_model you’ll notice that the $this->_xml… dumps the initial core classes (with no rewrite) and you’ll see your rewrite down the line well past the core/cache. So, it’s probably being overridden but the class is already instantiated, set up and used; so it’s really not going to fire anything.

    Hence i don’t think it’s possible to override the core/cache. You’ll have to move it to the app/code/local. Pitty.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this set of rewrite rules: ########## Begin - Joomla! core SEF Section
I think this may be relatively straight forward. I have a rewrite rule that
I try to rewrite core file from magento. Somehow it does not overwrite the
The company where I work created this application which is core to our business
I have strange problem with .htaccess I can't solve: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond
When I try to overwrite a model from Mage_Catalog (Mage_Catalog_Model_Product_Image for instance) I have
I have a rewrite in nginx or Apache for this address: http://domain.com/hello to a
Say I have a rewrite that needs to pass the url to a PHP
I have the following rewrite rule rewrite ^/ab(.*)/(.*)$ /repo/ab$1/rtest/$2 break; When the request file
I have the following rewrite set up: RewriteRule r/(.*) scripts/report.php?cp=1&id=$1 It works great to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.