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 7414099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:00:21+00:00 2026-05-29T07:00:21+00:00

I have seen the wiki page on how to cache block output on Magentocommerce.com

  • 0

I have seen the wiki page on how to cache block output on Magentocommerce.com and read an inchoo article on how to do it. However, I want to cache the output of a module that isn’t tied into a product.

What my module does is load up the colour entries in an attribute, does some maths on them to sort them by tint/hue/brightness etc. and then outputs a colour picker (that can be used on product pages).

I have other modules that could also benefit from cache control, again these are not particularly tied to a product. Hence, in the tutorials, where there is this:

'cache_tags'     => array(Mage_Catalog_Model_Product::CACHE_TAG),
'cache_key'      => $this->getProduct()->getId()

do I just stuff in any old numbers?

http://inchoo.net/ecommerce/magento/magento-block-caching/

http://www.magentocommerce.com/wiki/5_-_modules_and_development/block_cache_and_html_ouput

  • 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-05-29T07:00:22+00:00Added an answer on May 29, 2026 at 7:00 am

    You should use custom cache tag and key

    'cache_tags'     => array(Yourpackage_Yourmodule_Model_Yourmodel::CACHE_TAG) 
    'cache_key'      => '<your cache key here>'
    

    If I got you right, your block output is always the same, that’s why you can use attribute code as cache tag and attribute id as key (for example).

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

Sidebar

Related Questions

From the following page (http://code.google.com/p/appengine-pipeline/wiki/GettingStarted) I have seen the following code in an example
I'm creating a site that is going to have a wiki article database. Right
I have seen many places say quicksort is good because it fits to cache-related
Have you seen yahoo's ipad/tablet home page? The swipe effect for flipping through headlines
I have seen the following implementation of circular buffer: http://en.wikipedia.org/wiki/Circular_buffer /**< Buffer Size */
Have seen some similar questions: What is the difference between a JavaBean and a
I have seen in some stackoverflow questions/answers people talking about a boost macro (I
I have seen a number of questions and answers on how to reduce your
I have seen more than a couple of sites using flash content and displaying
I have seen examples of ListView where each row has multiple view objects, like

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.