The better to cache in php?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
8 views
I have a lot of pages that are dynamically generated and there is a task to make a quick caching. Every body like this page about 50килобайт, pages of about 30000


The system works on php. To cache in the database is considered sufficiently redundant. Was memcache, but since it stores everything in memory only after a restart its cache falls refused it. Now I use mongo, but somehow it periodically crashes on some recordings after a few days of work


The load is high. Maybe all these are in the file cache to translate?
by | 8 views

5 Answers

0 like 0 dislike
Maybe you can help him with nginx proxy_store?
by
0 like 0 dislike
The cache files are taxis for such amounts, the hot pages in the cache of the FS in memory, the rest will not be lost when you restart. I once used a website to 100-150 thousand pages the same as you size, but because it was in memcached, because I didn't need to store the cache after the restart, and memory on the server a lot, and even compressed all the memory, CPU is not a pity.
by
0 like 0 dislike
you can try Redis — it has the ability to save data to disk habrahabr.ru/blogs/webdev/81917/
by
0 like 0 dislike
Membase and not what is not? nosql, the same api as memcache.
by
0 like 0 dislike
continue to keep in memcache, why to overload the server? you data take nginx-om directly from memcache? the problem of the generation of the cache?
by

Related questions

0 like 0 dislike
5 answers
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
asked Apr 4, 2019 by nepster-web
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
27,959 users