Fishpig Wordpress Magento Frontpage Cache?
I'm sure this is obvious but I've googled all day to no avail so here goes: I'm using fishpig WP/Magento integration and seem to be having cache related problems. Not sure where the problem is so I'd really appreciate assistance in tracking it down.
Magento cache disabled. Server cache Varnish is off. I'm using the following WP plugins that I can't see use Cache: Bulk Move, FG Joomla to WordPress Premium, FG Joomla to WordPress Premium Rokbox module, Lightbox Gallery, Post Type Switcher, Regenerate Thumbnails
I've got 15 WP recent articles showing on the frontpage of my Magento site but no changes are shown when I change and update the content of an article. However the changes are shown when I click through to the article. So the category page view of the article summaries seem to be cached while the actual article is uptodate. I should say that the actual WP category blog page seems cache the article summaries. So NOT just the front page of the magento site.
here is the test site URL: webjazz.com.au - try clicking through "Stax of Sax 2 - What a Fantastic Night!" article.
Any suggestions please? Thanks, Rob
This certainly sounds like a cache issue but you will need to identify what cache is causing the problem first. There is magento block caching (you say turned off), varnish extension (you say turned off), so maybe it's a PHP cache like APC or something?
I would firstly manually delete contents of magento/var/cache/ and check the page to see if this sorts it out. If not, I would then restart apache or nginx (whatever your web server is running) and then check results. Without knowing what cache mechanism is causing the problem it's hard to give you a solution. If it turns out to be magento block caching you will need to delete the cache for the block whenever you save a wordpress article so it gets regenerated automatically, or you could disable magento blcok caching for the block showing the articles on the homepage so they always get loaded from DB on every request. I generally put a small cache time on blocks with block caching of say a few hours so I can garuntee they get regenerated at some time throughout the day.
eg
class Magebase_Example_Block_Cached extends Mage_Core_Block_Abstract
{
protected function _construct()
{
$this->setCacheLifetime(3600);
}
...
}
There is a good tutorial on magento block caching here: http://magebase.com/magento-tutorials/adding-cache-support-to-magento-blocks/
This cannot be a PHP cache as this caches the code and not the data. The code would be compiled and the DB data would be retrieved dynamically, meaning the updated DB data would be returned and the new posts would show.
PHP code caches do not cache the output, just the code itself.
If the Magento cache is disabled, it cannot be the FishPig extension. This connects directly to the WP database so it also can't be a WP cache.
It is most likely that Varnish isn't actually disabled. Double and triple check Varnish!
链接地址: http://www.djcxy.com/p/61208.html