I'm developing couple of Magento extensions that change the content of the sites dynamically (alternative products sorting, different related items, etc), based on things like user and time.
These features work perfectly on non cached sites, but unfortunately for most sites there's some sort of caching mechanism that prevents my extension changes to take effect.
For some sites I can ask the owner to mark specific blocks as uncacheable (like the related products for example), but apparently its not always possible, and for other features, removing the cache on the entire collection will make the site too slow.
So I wanted to ask how do you guys handle caching in your extensions, when you want to change site's content programatically (eg when you can't operate with cache even if its cleared often)? what are the tricks and techniques you use to overcome this problem?
So far I managed to do some hybrids between magento code and JavaScript with ajax and jquery to change the cached content after page is loaded, but that's less scalable, uglier, and feels wrong. I want to reduce the js to minimum.
Am I doomed to make all my extensions more ajax and js based instead of using all the wonderful tools Magento provide me if I want to work on cached content?? :/
Thanks!