Essentially I have a PHP page that calls out some other HTML to be rendered through an object's method. It looks like this:
MY PHP PAGE:
// some content...
<?php
$GLOBALS["topOfThePage"] = true;
$this->renderSomeHTML();
?>
// some content...
<?php
$GLOBALS["topOfThePage"] = false;
$this->renderSomeHTML();
?>
The first method call is cached, but I need renderSomeHTML() to display slightly different based upon its location in the page. I tried passing through to $GLOBALS, but the value doesn't change, so I'm assuming it is getting cached.
Is this not possible without passing an argument through the method or by not caching it? Any help is appreciated. This is not my application -- it is Magento.
Edit:
This is Magento, and it looks to be using memcached. I tried to pass an argument through renderSomeHTML(), but when I use func_get_args() on the PHP include to be rendered, what comes out is not what I put into it.
Edit:
Further down the line I was able to "invalidate" the cache by calling a different method that pulled the same content and passing in an argument that turned off caching. Thanks everyone for your help.