I am facing a situation where I need to invalidate a specific View in order to initiate clearing the cache on that View.
I called this twice, once in the function mymodule_myaction_form() and again in the function mymodule_myaction_submit(). It's normally used to automatically clear a views cache when related content is added or updated, however it provides a framework to monitor a cache segment.I haven't done this, but developer docs are available. If you are able to use rules in your situation, then you don't even need to write custom code, you can just use the module as-is and set up rules to clear the caches of certain views.In the past a number of people had difficulty setting up and deploying APC correctly both in CLI web.Using files should make setting up Cake PHP simpler for new developers. If you are using APC or Memcache you should make sure to set unique keys for the core caches.You can easily store the results of expensive queries, or remote webservice access that doesn’t frequently change in a cache.
Once in the cache, re-reading the stored resource from the cache is much cheaper than accessing the remote resource.
How can I trigger a cache invalidation for a specific View from inside my module code?
Correct me if I'm wrong, but it looks like you have to have the entire View in scope to execute this.
Caching is frequently used to reduce the time it takes to create or read from other resources.
Caching is often used to make reading from expensive resources less expensive.
I'm specifically looking for a way to target a Views cache with PHP from within my own module code. Otherwise, check out the internals of how it works as a guide to clearing view caches programmatically.