Selective Disable APC caching

I installed APC on my VPS and it works great with W3 Cache wordpress plugin. My problem is that there is one database in MySQL which is pinged by client end every few seconds to see if there are new updates. These db contains certain time sensitive information and hence it can’t be part of cached data.

How can I disable APC for this database/files? or Can I set a very short expiry of certain type of data?

Read More

Any help is highly appreciated.

Related posts

Leave a Reply

1 comment

  1. APC does two things. It provides a transparent cache of PHP bytecode, and it can cache data at the request of the application.

    There is no reason at all to attempt to disable the bytecode cache, but that’s not what you seem to be talking about here. The bytecode cache just caches bytecode, not data.

    If the application you are using asks APC to cache certain data, and it does not contain an option to disable this caching if APC is installed and available, you are going to need to modify that application. Look for calls to apc_store and apc_fetch and alter the code as required.

    As mentioned in the comments, your real problem is probably with the WordPress caching plugin that you’ve chosen, not with APC. APC just stores data. If it can not disable itself for selected pages, you may need to find a solution that can, or find another way to get to the data you need that bypasses it.