What is a good solution if I need to store a large number of similar files in the server? How to avoid single directory file limit?

WBOY
Release: 2016-08-18 09:15:47
Original
1049 people have browsed it

I want to store the static cache of pages in the server cache folder. However, a large number of new page caches are generated every day, and they are frequently read and written.
For this situation, what is a good solution to avoid various limitations and performance issues?

Reply content:

I want to store the static cache of pages in the server cache folder. However, a large number of new page caches are generated every day, and they are frequently read and written.
For this situation, what is a good solution to avoid various limitations and performance issues?

File restrictions can be modeled on squid’s hash into hierarchical directories; for performance, use SSD.

If it is frequently read and written, what is the use of keeping it in the cache?

Enlarge the memory, set an expiration time, and write directly to the memory
redis memcache, etc.

Hash directory hierarchical storage, take the first few characters of the file name or other methods

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!