This invention discloses a method and
system for targeted updates of rendering units and
cache consistency processing based on
data dependency range, belonging to the technical field of
Internet content management systems. The method includes: pre-establishing a
data dependency mapping relationship between content
data objects and multiple rendering units, defining the
data field range that each rendering unit depends on; when a change in the content data object is detected, determining the field range involved in the change, and finding the rendering units that depend on that field range according to the
data dependency mapping relationship, forming a set of affected rendering units; generating a cache key based on the
data query conditions corresponding to each rendering unit in the affected rendering unit set, and performing invalidation
processing on the associated cached data; when the next
server-side rendering request is received, if the corresponding cached data is detected to be invalid, re-executing the
database query and completing the
server-side rendering update. This invention, by introducing field-range-
level data dependency modeling, achieves refined propagation of the
impact of content changes and cache update control, improves
cache hit rate, reduces unnecessary
database access and
server-side rendering calculations, and enhances the
system's response efficiency and stability in content change scenarios, thereby achieving a balance between
cache consistency and
system performance, and significantly reducing the computational overhead of server-side rendering.