deleted-mifki2012-11-24 14:12:05
deleted-mifki, 2012-11-24 14:12:05

Apc/XCache and two identical sites on the server?

The main site (based on CakePHP) and its separate test version live on the same server, that is, a complete copy with some changes during the development process. So, when you turn on Apc or XCache, it caches, for example, the site controller class that was first accessed, after which the second site starts working in exactly the same way, that is, the class from the first cache is used.
Does it cache classes without paying attention to the fact that they have different full paths? What to do with it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
jetman, 2012-11-24

In my opinion this problem is present only in XCache*. With us, it disappeared after the transition to APC.
*When using the standard PHP-FPM and XCache packages on Ubuntu 12.04.

Alexey Akulovich, 2012-11-24

APC can show lists of cached files via the web interface (apc.php is included).
Compare the lists in terms of the path to the controller when accessing sites in turn, with cache flushes between checks.

Murloc, 2013-07-15

Perhaps CackePHP is caching variable values, not just files. For example, a list of controllers, their parameters. Try changing the prefixes, in theory they should be in the settings.

SKiPP, 2013-07-23

Cache::config('default', array(
'prefix' => 'apc_',
you need to change the prefix for example to 'apc_test_'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question