G
G
Gweningwarr2014-12-03 13:57:30
caching
Gweningwarr, 2014-12-03 13:57:30

Two almost identical symfony 2 projects, on the same host?

Hello.
There was a need to make almost the same site, but on a separate domain with minor changes in the code (localization for many languages), domains are configured on the same server
Deployed a new project on Symfony 2, while the old one was on 2.5 new on 2.6 copied the project bundle itself, settings The databases remained the same as in the first project, only the key (secret) and the base locale were changed. I also set up sessions in app/sessions, the cache is set in app/cache
But anyway, the first project partially interrupts the other one, and if I restart Apache and open the second project first, for example, it starts interrupting the first one (that is, part of the layout comes from another project, as if the cache was taken from the project that interrupts) I don’t understand what else I haven’t configured in the cache?
The server has xcache opcach memcache in the project, only such cache driver settings
...
entity_managers:
default:
metadata_cache_driver: xcache
query_cache_driver: xcache
result_cache_driver:
type: memcache
host: localhost
port: 11211
instance_class: Memcache
class: Doctrine\Common\Cache\MemcacheCache
. ..
never touched anything else

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gweningwarr, 2014-12-03
@Gweningwarr

I found a similar problem with Apc/XCache and two identical sites on the server
. As a result, after digging, I realized that I need to assign a prefix for the file cache, in my case it looks like this
$cachedLoader = new XcacheClassLoader(sha1(__FILE__), $loader);
$loader->unregister();
$cachedLoader->register(true);
What is called the elephant did not notice :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question