Reputation: 3426
Looking at creating my first web application using php and an opcode cache.
I vaguely understand why it's beneficial in theory.
However, in practice - how does apc work with opcodes compiled from session specific variables? If one page (say somesharedpage.php) is cached, how are variables within (that may be different for every user) treated and handled?
Upvotes: 0
Views: 433
Reputation: 173662
Simply, APC works with code and not data, because data doesn't contain any opcodes.
When should data be added to apc?
Data that you would want to cache using apc_fetch()
, apd_store()
etc. are ideally values that would take some processing time to get generated, rather than simply "all my globals".
Upvotes: 3