Symfony + APCu: When and how to use?

  apcu, symfony

I have a basic understanding problem regarding the HOW and WHEN to use APCu Cache in Symfony.

What I think I understood until now:

  • APCu cache is "append only" type of cache, where you can’t/shouldn’t invalidate, but only add new items. (listening to a talk of Nicolas Grekas/Symfony) He even says it’s not really useful for applications, it’s more like a system cache.
  • Use cases: for things that don’t change, like Annotations or Routes.

So questions arise from that:

  • is caching annotations really something that is "relevant" when we talk about Symfony performance? Or are there better examples on when to use it?
  • I do understand that apcu in general has to be used in code, it doesn’t do anything automatically if you install it on your server. So how to use/enable APCu in Symfony?

I think the main problem for me is I just don’t have any good use-case examples to see a reason why to use it.

Source: Symfony Questions