search

Home  >  Q&A  >  body text

Thoughts on tp5.1 cache files

In tp5.1, I have an idea to encapsulate a class and write all the data that needs to be read, including update and delete methods. The key point is that this class generates cache files. When called like this, it does not go through the database. Is it fast? I imagine it will be faster. I just don’t know if it’s safe

A影视文娱 杨A影视文娱 杨2092 days ago1828

reply all(4)I'll reply

  • 马先生

    马先生2019-02-21 21:57:08

    Not through the database. Does your data exist in the cache? ? ? Then the memory needs 1t, right? ? ?

    reply
    0
  • A影视文娱 杨

    What I mean is that when querying through the database for the first time (whether it is a single query or multiple queries), it is stored in the cache file in josn mode, and then it is not read from the database, and is added to the database. Update cache files when deleting This cache is actually a file that uses the key name and table name as parameters to encapsulate the class.

    A影视文娱 杨 · 2019-02-21 22:11:01
    A影视文娱 杨

    Strictly speaking, it is not called cache, but it is generated similar to a configuration file.

    A影视文娱 杨 · 2019-02-21 22:13:28
  • Cancelreply