# Icon4Py CI Caching ###### tags: `cycle XX` <!-- Change to the current cycle number --> - Shaped by: - Appetite (FTEs, weeks): - Developers: <!-- Filled in at the betting table unless someone is specifically required here --> ## Problem <!-- The raw idea, a use case, or something we’ve seen that motivates us to work on this --> ## Appetite <!-- Explain how much time we want to spend and how that constrains the solution --> ## Solution - Extract `Cache Manager` from PMAP-CI-Utils into a dedicated package See https://github.com/PMAP-Project/PMAP-CI-Utils/tree/main?tab=readme-ov-file#cache-manager---cache_manager for a short description Code located here: https://github.com/PMAP-Project/PMAP-CI-Utils/tree/main/cache_manager See usage here: - https://github.com/PMAP-Project/PMAP-GO/blob/main/ci/stages/stage_1_populate_cache.yml#L14 - https://github.com/PMAP-Project/PMAP-GO/blob/main/docker/setup-ci-env.sh#L14 - Adopt ICON CI configuration - Stage 1: Load cache `pmap_ci_utils_cache_manager restore-cache-from-previous-commits $SOME_FOLDER_ON_SCRATCH` - Stage 2: Run all CI Jobs - Stage 3: Update cache `pmap_ci_utils_cache_manager update-cache ${CACHE_DB_DIR} ${GT_CACHE_ROOT}` Extracting the entire cache to a folder on scratch, as well as using it from there is slow. A faster solution would be to implement cache merging functionality. In the long term we should probably do that anyway. ## Rabbit holes <!-- Details about the solution worth calling out to avoid problems --> ## No-gos <!-- Anything specifically excluded from the concept: functionality or use cases we intentionally aren’t covering to fit the ## appetite or make the problem tractable -->