The invention discloses a data caching method and device, equipment and a storage medium, and relates to the technical field of computers, and the method comprises the steps that a
data acquisition request initiated by a target
client for target data is acquired, after the
data acquisition request reaches a gateway, the gateway judges whether a first-level cache located in a local memory hits the target data or not according to a target caching rule, and if yes, the first-level cache in the local memory hits the target data; if the target data is hit, obtaining the target data from the first-level cache and returning the target data to the target
client, if the target data is not hit, judging whether the target data exists in a second-level cache of the preset cache
middleware or not, and if the target data exists in the second-level cache, obtaining the target data from the second-level cache and returning the target data to the target
client, and if not, obtaining the target data from the
service system and returning the target data to the target client. According to the method, network transmission and I / O operation of a disk are reduced in a multi-level cache mode, the client request efficiency, the CPU
resource utilization rate and the query frequency processed by the
system in unit time are improved, and meanwhile cache data can be prevented from being lost.