Search

I wanted to clear the APC cache when saving an entry. From this article, it looks like running the line

apc_clear_cache()

will do the trick. Where would be the best place to put that line?

What exactly are you using APC for? While you CAN use it as a key/value store, you would already have APC commands in place somewhere or using an extension. It only caches the compiled PHP code by default, so there shouldn't be a need to clear that when saving an entry. Just curious... ;)

Where would be the best place to put that line?

Custom extension, subscribe to the corresponding delegate and put your line in the callback function.

What caching solution would you recommend?

Keep APC for bytecode caching. Rest depends. Nick wrote a good article about caching a while ago. But as far as I know, most caching extensions are somewhat abandoned and no longer actively maintained. Might still work if you're lucky, otherwise you'd need to put in a little extra work and update one yourself.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details