I want ask : if cache too many page 10000 page is cached.
10000 page create 10000 file cache. Is it ok ? it can create slow?
I want ask : if cache too many page 10000 page is cached.
10000 page create 10000 file cache. Is it ok ? it can create slow?
I don't think that this could slowdown the application. Modern file systems support big amount of files in a directory. The problem is if you what to manually list all those files.
A cache file is stored on the server as static HTML rather than the dynamically generated HTML code that is created with PHP.
Loading these cache files is significantly quicker than running PHP code through the PHP compiler at runtime.
The only issue is perhaps disk space as the cache files are physical files on the server. Most cache filesizes should be relatively small if used correctly so this really shouldn't be an issue on a proper web server with sufficient resources.
Cache files are generally always faster than running the PHP script as they do not have to be processed - the overhead is just hitting the file and retrieving it.
The compromise you make with cache is whether or not your data changes often enough to warrant using file cache, and whether or not users need access to an always up to date file.
I wouldn't worry about it, and hey you can always turn the cache off - right?