You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ArteMerlow edited this page May 28, 2025
·
1 revision
About caching
The caching feature of this ORM store in cache the data to improve reading (GET) system by saving the results of the SELECT requests. The cache is maintained in memory and bound by a size limit to avoid over consumption of memory. If the cache is full, and there is a request to cha nge a key/value pair, it should discard the least us ed item in the cache. Every cache item stores the original SQL query and its parameters (in the form of an escape array), as well as the result set and a timestamp indicating the time of caching. There is also a Time-To-Live (TTL) associated with the cached data, it represents how long the data is still valid.
If the present time surpasses the TTL, the cached resource is marked as invalid and deleted at the next access attempt. Caching is used during SELECT queries. Other queries that edit data such as INSERT, UPDATE, DELETE, and so forth, clear the relevant cache partitions. Different behaviors of caching can be adjusted with settings like turning caching on and off, changing the upper limit of memory cache, and so forth.