When cache is disabled,
Mage::getSingleton('cms/page')->getIdentifier(); is working fine and i am getting correct page identifier for all pages.
But when cache is enabled, it is always returning the page identifier that's loaded first.
I am calling it in phtml files. Should it work fine in block classes?
Actually all code are being cached somehow AND I cant see any output of new code unless I flush or disable cache. So this does not seem to be an issue of this particular singleton object. On same server, another magento installation/project is fine with cache enabled and I can see uptodate immediately. I am looking into the issue. It might be any other setting or the theme that has come up with some extensions.