The invention provides a
cache management method and device based on a distributed entity cache architecture. The
cache management method comprises a cache query method and a cache update method. The method comprises the following steps: initiating a cache query request; generating a cache key value based on the entity class ID, the entity class field
fingerprint and the application version number; using the cache key value to query whether corresponding cache data exists in a cache
database, and if yes, directly returning the cache data; if not, querying the
database to return result data, performing
serialization processing on the result data, setting a cache value and
expiration time, and writing the result data into a cache
database; initiating a cache updating request; generating a cache key value based on the entity class ID, the entity class field
fingerprint and the application version number; and executing a cache updating strategy on cache
processing in the cache database according to the cache key value, and returning an updating result. The invention provides a distributed entity cache architecture, which realizes automatic
cache management of query and update operations, improves the database
processing efficiency and ensures the consistency of data of multiple data sources.