The invention provides a front-end
continuous integration increment construction method and device based on persistent cache. The method comprises the following steps: reading a construction configuration, establishing a construction context, initializing a persistent cache, and generating an environment
fingerprint and a configuration
fingerprint; checking the environment
fingerprint and the configuration fingerprint of the round, determining a change module set based on file snapshot comparison, and determining an affected code block set; a compiling result is accessed to the
module dependency graph, and corresponding module-level cache records are multiplexed for the unchanged modules; according to the updated
module dependency graph, generating and merging the affected code blocks, and
multiplexing corresponding code
block level cache records for the unaffected code blocks; and writing the updated code block as a construction product, updating a product
list, and writing the file snapshot, the module-level and code block-level cache records and the
module dependency graph formed in the round into a persistent cache. According to the method, incremental construction can be realized, the cache is stably reused, compiling and product recalculation are reduced, and the
assembly line duration is remarkably shortened.