memcached, APCu or redis as cache for Symfony and Doctrine
Asked Answered
G

1

6

We're currently trying to decide, what cache we should use with Symfony and Doctrine. The idea behind it, is to reduce load and db calls, by caching values. The caching systems in question are: memcached, APCu and redis.

Our current favorite would be APCu, as memcache probably will have a small overhead for it's capabillity to run as a distributed cache, however it would also allow to store PHP sessions directly in memcache. Redis seams "to much" as it can be used as a DB, so probably a lot of overhead, which leaves APCu.

The Symfony version currently used by us is 2.8, we will probably update it to 3.x in the near future, du to better integration of cache (for 3.1 and 3.3 we'll probably wait for the Symfony 3.3 release)

The advantage of memcached is clearly, that it is distributed, meaning multiple servers could access it. However we currently run the Symfony app on just one server and there's no plan yet to change this.

The question: What are the pros and cons of the three different caching systems? Specially, when using Symfony 2.8 vs. when using Symfony 3.x? What is the load, they will put on the System?

If the question is to opinion based, please feel free to close it.

Goatskin answered 5/5, 2017 at 22:31 Comment(0)
H
3

apcu and redis for data store (like doctrine metadata) there is a redis bundle that handles sessions and doctrine metadata https://github.com/snc/SncRedisBundle

Hugmetight answered 6/5, 2017 at 0:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.