: This article mainly introduces common cache technologies in PHP ?, If you are interested in the PHP Tutorial, refer.
- Data cache: it refers to the database query cache. each time you access the page, it first checks whether the cache data exists. if it does not exist, it connects to the database to obtain the data, serialize the query results and save them to the file. later, the same query results will be obtained from the cache table or file. For example, when multiple tables are joined, an array generated in the appendix is saved to a field in the master table. if necessary, the array is decomposed. the benefit of this is read-only tables, the downside is that two data synchronization takes many steps, and the database is always the bottleneck. changing the speed with hard disks is the key point.
- Page cache: each time you access a page, the system first checks whether the corresponding cached page file exists. if it does not exist, it connects to the database to obtain data, displays the page, and generates cache page files at the same time, in this way, the page file will play a role in the next visit.
- Time departure cache: checks whether a file exists and the timestamp is earlier than the set expiration time. If the modified timestamp of a file is greater than the current timestamp minus the expiration timestamp, the file will be cached for a long time. Otherwise, the cache will be updated.
- Content-triggered cache: when data is inserted or updated, the cache is forcibly updated.
- Static cache: static cache refers to static, which directly generates HTML, XML, and other text files. it is re-generated once when updated. it is suitable for pages that do not change much.
Which of the following describes common PHP Cache technologies ?, Including some content, hope to be helpful to friends who are interested in PHP tutorials.