XCRemoteCache is a remote cache tool for Xcode projects.

Related tags

Cache XCRemoteCache
Overview

XCRemoteCache is a remote cache tool for Xcode projects. It reuses target artifacts generated on a remote machine, served from a simple REST server.

Build Status License Slack

How and Why?

The caching mechanism is based on remote artifacts that should be generated and uploaded to the cache server for each commit on a master branch, preferably as a part of CI/CD step. Xcode products are not portable between different Xcode versions, each XCRemoteCache artifact is linked with a specific Xcode build number that generated it. To support multiple Xcode versions, artifacts generation should happen for each Xcode version.

The artifact reuse flow is as follows: XCRemoteCache performs a target precheck (aka prebuild) and if a fingerprint for local sources matches the one computed on a generation side, several compilation steps wrappers (e.g. xcswiftc, xccc, xclibtool) mock corresponding compilation step(s) and linking (or archiving) moves the cached build artifact to the expected location.

Multiple commits that have the same target sources reuse artifact package on a remote server.

Accurate target input files

Finding a precise list of input and dependency files is a non-trivial task as Xcode heavily relies on implicit target dependencies. It means that Xcode is trying to use required dependencies from provided search paths and looks up DerivedData's product dir. To find a narrow list of files to compute fingerprint hash, XCRemoteCache fetches a meta.json file from a server which contains remotelly generated fingerprint hash and a list of input files that should constitute a fingerprint. That list of input files was produced during the artifact generation process, based on .d output from clang and swift compilers.

Before building a project in Xcode, XCRemoteCache needs to find the best git commit sha for which artifacts will be used. This happens as a part of the xcprepare execution, which should be called after each merge or switching a branch. xcprepare finds a list of 10 most recent common sha with the remote repo branch using git's first-parent strategy and selects the newest one for which all artifacts have been uploaded.

The generation side is responsible to call xcprepare mark subcommand after each successful build. Marking process creates an empty marker file on a remote cache server with a given format: #{commmmitSha}-#{TargetName}-#{Configuration}-#{Platform}-#{XcodeBuildNumber}-#{ContextBuildSettings}-#{SchemaID}.json.

xcprepare makes HEAD requests for all identified shas, picks the newest one for which a marker file exists remotely, and saves it in the text form to the arc.rc file. That file informs the prebuild phase which meta file should be fetched to get a list of target dependency files.

New file added to the target

Considering in the hash fingerprint only a list of previously observed files can give invalid results if a build contains a new source file as it isn't considered in the hash.

For a new .swift file in a swift-only target, xcswiftc automatically recognizes that case and forces local compilation of the entire target. For Objective-C or mixed targets, fallbacking to the local compilation is more difficult as some previous invocations (either xccc or xcswiftc) could already be finished with no-operation. To mitigate that, each wrapper appends invocation call to a side file (history.compile) just in case some other process would need to compile the entire target locally. If that happens, compilation of the newly added file acquires a target-wide lock that stops other wrapper invocations, executes already mocked steps one by one to backfill already skipped compilation steps.

Debug symbols

Binaries built with "debug symbols: enabled" embed source file absolute paths so compilation products cannot be directly ported between two machines with different source roots. Otherwise, LLDB debugger is not able to correlate a set of currently executing machine instructions with a local file that produced it. To mitigate that, XCRemoteCache recommends adding a custom C and Swift debug flags prefix-map for all XCRemoteCache builds. These flags ensure that all binaries, generated locally and downloaded from a remote server, have the same debug symbols absolute paths which are translated to an actual local path at the beginning of the LLDB session.

Performance optimizations

XCRemoteCache involves several optimization techniques:

  • Local HTTP cache stores all responses from the remote server at ~/Library/Caches/XCRemoteCache/
  • Prebuild and postbuild steps leverage Xcode's discovered dependency file to avoid recomputing fingerprint hashes if none of the input files has changed
  • A wrapper for the clang compilation is a C program, generated and compiled during the xcprepare step. It is called many times to compile each *.(m|c) file and accessing a disk to read a configuration would introduce a significant slowdown, especially if a project contains a lot of Objective-C files. As a remedy, xcprepare reads the XCRemoteCache configuration only once and embeds all configurable fields directly into the xccc binary
  • arc.rc, generated by xcprepare, gets file modification equal to the commit date if refers. arc.rc is included in the discovered dependency file, touching it in the xcprepare would automatically invalidate previous XCRemoteCache prebuild step and force redundant fingerprint checks. By syncing the mdate with a git commit, Xcode avoids prebuild steps unless the remote cache commit has changed
  • If a target cache miss happens, XCRemoteCache disables cache for that target until a commit sha in arc.rc changes. That bypasses a fingerprint computation for incremental builds

Focused targets

If a list of targets that can have dirty sources is limited, XCRemoteCache can be configured with focused targets, specified in .rcinfo.

By default, all targets are focused and these compare local fingerprint with one available remotely and fallbacks to the local compilation if it doesn't match. Non-focused targets, called 'thin' targets, always use cached artifacts what eliminates a fingerprint computation. Thin targets should contain only a single compilation file with thin_target_mock_filename, e.g. standin.swift or standin.m.

How to integrate XCRemoteCache with your Xcode project?

To enable XCRemoteCache in the existing .xcodeproj you need to add extra build settings and build phases to targets that you want to cache.

You can do that in an automatic way, using the XCRemoteCache-provided integration command, or manually modify your Xcode project.

1. Download XCRemoteCache

From the Github Releases page, download the XCRemoteCache bundle zip. Unzip the bundle to a directory next to your .xcodeproj.

The following steps will assume the bundle has been unzipped to xcremotecache dir, placed next to the .xcodeproj.

A. Automatic integration

2. Create a minimal XCRemoteCache configuration

Create .rcinfo yaml file next to the .xcodeproj with a minimum set of configuration entries, like:

primary_repo: https://yourRepo.git
cache_addresses:
- https://xcremotecacheserver.com

3. Run automatic integration script

3a. Producer side

Execute a command that modifies :

xcremotecache/xcprepare integrate --input <yourProject.xcodeproj> --mode producer --final-producer-target <YourMainTarget>
3b. Consumer side

Execute a command that modifies :

xcremotecache/xcprepare integrate --input <yourProject.xcodeproj> --mode consumer
A full list of xcprepare integrate supported options
Argument Description Default Required
--input .xcodeproj location N/A
--mode mode. Supported values: consumer, producer N/A
--targets-include comma-separated list of targets to integrate XCRemoteCache. "" ⬜️
--targets-exclude comma-separated list of targets to not integrate XCRemoteCache. Takes priority over --targets-include. "" ⬜️
--configurations-include comma-separated list of configurations to integrate XCRemoteCache. "" ⬜️
--configurations-exclude comma-separated list of configurations to not integrate XCRemoteCache. Takes priority over --configurations-include. Release ⬜️
--final-producer-target [Producer only] The final target that generates cache artifacts. Once this targets is finished, no other targets are allowed to upload artifacts to the remote server for a given sha, configuration and platform context. nil ⬜️
--consumer-eligible-configurations [Consumer only] comma-separated list of configurations that need to have all artifacts uploaded to the remote site before using given sha. Debug ⬜️
--consumer-eligible-platforms [Consumer only] comma-separated list of platforms that need to have all artifacts uploaded to the remote site before using given sha iphonesimulator ⬜️
--lldb-init LLDBInit mode. Appends to .lldbinit a command required for debugging. Supported values: 'none' (do not append to .lldbinit), 'user' (append to ~/.lldbinit) user ⬜️
--fake-src-root An arbitrary source location shared between producers and consumers. Should be unique for a project. /xxxxxxxxxx ⬜️
--output Save the project with integrated XCRemoteCache to a separate location. N/A ⬜️

B. Manual integration

2. Configure XCRemoteCache

Create yaml configuration file .rcinfo, next to the .xcodeproj, with your full XCRemoteCache configuration, according to the parameters list e.g.:

primary_repo: https://yourRepo.git
cache_addresses:
 - https://xcremotecacheserver.com
repo_root: "."
remote_commit_file: arc.rc
xccc_file: xcremotecache/xccc

3. Call xcprepare

Execute xcprepare --configuration #Configuration# --platform #platform# command after each merge or rebase with the primary branch. Otherwise, the remote cache artifacts may be outdated and final hit rate may be poor.

The xcprepare application saves arc.rc file on a disk and prints a summary to the standard output. The printed recommended_remote_address is just a recommendation which cache remote server use. It is up to the integration tooling to decide if it makes sense. If so, the project's .rcinfo should define that value as recommended_remote_address parameter.

Example:

$ xcremotecache/xcprepare --configuration Debug --platform iphonesimulator
result: true
commit: aabbccc00
age: 0
recommended_remote_address: https://xcremotecacheserver.com

4. Integrate with the Xcode project

Configure Xcode targets that should use XCRemoteCache:

  1. Override Build Settings:
  • CC - xccc_file from your .rcinfo configuration (e.g. xcremotecache/xccc)
  • SWIFT_EXEC - location of xcprepare (e.g. xcremotecache/xcswiftc)
  • LIBTOOL - location of xclibtool (e.g. xcremotecache/xclibtool)
  • LD - location of xcld (e.g. xcremotecache/xcld)
Screenshot

build-settings

  1. Add a Prebuild build phase (before compilation):
  • command: "$SCRIPT_INPUT_FILE_0"
  • input files: location of xcprebuild (e.g. xcremotecache/xcprebuild)
  • output files:
    • $(TARGET_TEMP_DIR)/rc.enabled
    • $(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME)
  • discovery dependency file: $(TARGET_TEMP_DIR)/prebuild.d
  1. Add Postbuild build phase (after compilation):
  • command: "$SCRIPT_INPUT_FILE_0"
  • input files: location of xcpostbuild command (e.g. xcremotecache/xcpostbuild)
  • output files:
    • $(TARGET_BUILD_DIR)/$(MODULES_FOLDER_PATH)/$(PRODUCT_MODULE_NAME).swiftmodule/$(PLATFORM_PREFERRED_ARCH).swiftmodule.md5
    • $(TARGET_BUILD_DIR)/$(MODULES_FOLDER_PATH)/$(PRODUCT_MODULE_NAME).swiftmodule/$(PLATFORM_PREFERRED_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(SWIFT_PLATFORM_TARGET_PREFIX)$(LLVM_TARGET_TRIPLE_SUFFIX).swiftmodule.md5
  • discovery dependency file: $(TARGET_TEMP_DIR)/postbuild.d
Screenshot

build-phases

5. Configure LLDB source-map (Optional)

Rewriting source-map is required to support debugging and hit breakpoints, see Debug symbols.

  1. Ooverride the following Build Settings for all targets:
  • XCRC_SRCROOT - /xxxxxxxxxx (or any other arbitrary string for your project)
  • add -debug-prefix-map $(SRCROOT)=$(XCRC_SRCROOT) to OTHER_SWIFT_FLAGS. If it doesn't exist, define it as $(inherited) -debug-prefix-map $(SRCROOT)=$(XCRC_SRCROOT)
  • add -fdebug-prefix-map=$(SRCROOT)=$(XCRC_SRCROOT) to OTHER_CFLAGS. If it doesn't exists, define it as $(inherited) -fdebug-prefix-map=$(SRCROOT)=$(XCRC_SRCROOT)
  1. Add settings set target.source-map /xxxxxxxxxx /Users/account/src/PathToTheProject to ~/.lldbinit on end machine that builds a project with XCRemoteCache

XCRC_SRCROOT arbitrary path should be project-exclusive to avoid clashing.

Tip: In some rare cases, Xcode caches ~/.lldbinit content so make sure to restart Xcode after the modification.

6. Producer mode - Artifacts generation

XCRemoteCache can operate in two main modes: consumer (default) tries to reuse artifacts available on the remote server and producer is used to generate all artifacts - it builds all targets locally and uploads meta and artifact files to the remote cache server.

6a. Configure producer mode

To enable the producer mode, configure it directly in the .rcinfo file.

Optionally, you can define extra_configuration_file in a .rcinfo with a path to the other yaml file that will override the default configuration in .rcinfo. That approach can be useful if you want to track main .rcinfo and keep your local configuration out of git.

6b. Fill the cache

Build the project from Xcode or using xcodebuild

6c. Mark commit sha

Once all artifacts have been uploaded, "mark a build" using xcprepare mark command:

$ xcremotecache/xcprepare mark --configuration Debug --platform iphonesimulator

That command creates an empty file on a remote server which informs that for given sha, configuration, platform, Xcode versions etc. all artifacts are available.

Note that for the producer mode, the prebuild build phase and xccc, xcld, xclibtool wrappers become no-op, so it is recommended to not add them for the producer mode.

A full list of configuration parameters:

Property Description Default Required
mode build mode. Possible values: consumer, producer consumer ⬜️
cache_addresses Addresses of all remote cache replicas. Required to be a non-empty array of strings N/A
recommended_cache_address Address of the best remote cache to use in the consumer mode. If not specified, the first item in cache_addresses will be used N/A ⬜️
cache_health_path Probe request path to the cache_addresses (relative to a path in cache_addresses) that determines the best cache to use nginx-health ⬜️
cache_health_path_probe_count Number of cacheAddresses probe requests 3 ⬜️
remote_commit_file Filepath to the file with the remote commit sha build/remote-cache/arc.rc ⬜️
xccc_file Path to the xccc wrapper build/bin/xccc ⬜️
prebuild_discovery_path Path, relative to $TARGET_TEMP_DIR, that specifies prebuild discovery .d file prebuild.d ⬜️
postbuild_discovery_path Path, relative to $TARGET_TEMP_DIR, that specifies postbuild discovery .d file postbuild.d ⬜️
mode_marker_path Path, relative to $TARGET_TEMP_DIR, of a maker file to enable or disable the remote cache for a given target. Includes a list of all allowed input files to use remote cache rc.enabled ⬜️
clang_command Command for a standard C compilation fallback clang ⬜️
swiftc_command Command for a standard Swift compilation fallback swiftc ⬜️
primary_repo Address of the primary git repository that produces cache artifacts (case-sensitive) N/A
primary_branch The main (primary) branch on the primary_repo that produces cache artifacts master ⬜️
repo_root The path to the git repo root "." ⬜️
cache_commit_history Number of historical git commits to look for cache artifacts 10 ⬜️
source_root Source root of the Xcode project "" ⬜️
fingerprint_override_extension Fingerprint override extension (sample override Module.swiftmodule/x86_64.swiftmodule.md5) md5 ⬜️
extra_configuration_file Configuration file that overrides project configuration user.rcinfo ⬜️
publishing_sha Custom commit sha to publish artifact (producer only) nil ⬜️
artifact_maximum_age Maximum age in days HTTP response should be locally cached before being evicted 30 ⬜️
custom_fingerprint_envs Extra ENV keys that should be convoluted into the environment fingerprint [] ⬜️
stats_dir Directory where all XCRemoteCache statistics (e.g. counters) are stored ~/.xccache ⬜️
download_retries Number of retries for download requests 0 ⬜️
upload_retries Number of retries for upload requests 3 ⬜️
request_custom_headers Dictionary of extra HTTP headers for all remote server requests [] ⬜️
thin_target_mock_filename Filename (without an extension) of the compilation input file that is used as a fake compilation for the forced-cached target (aka thin target) standin ⬜️
focused_targets A list of all targets that are not thinned. If empty, all targets are meant to be non-thin [] ⬜️
disable_http_cache Disable cache for http requests to fetch metadata and download artifacts false ⬜️
compilation_history_file Path, relative to $TARGET_TEMP_DIR which gathers all compilation commands that should be executed if a target switches to local compilation. Example: A new .swift file invalidates remote artifact and triggers local compilation. When that happens, all previously skipped clang build steps need to be eventually called locally - this file lists all these commands. history.compile ⬜️
timeout_response_data_chunks_interval Timeout for remote response data interval (in seconds). If an interval between data chunks is longer than a timeout, a request fails. 20 ⬜️
turn_off_remote_cache_on_first_timeout If true, any observed request timeout switches off remote cache for all targets false ⬜️
product_files_extensions_with_content_override List of all extensions that should carry over source fingerprints. Extensions of all product files that contain non-deterministic content (absolute paths, timestamp, etc) should be included. ["swiftmodule"] ⬜️
thinning_enabled If true, support for thin projects is enabled false ⬜️
thinning_target_module_name Module name of a target that works as a helper for thinned targets "ThinningRemoteCacheModule" ⬜️
aws_secret_key Secret key for AWS V4 Signature Authorization. If this is set to a non-empty String - an Authentication Header will be added based on this and the other aws_* parameters. "" ⬜️
aws_access_key Access key for AWS V4 Signature Authorization. "" ⬜️
aws_region Region for AWS V4 Signature Authorization. E.g. eu. "" ⬜️
aws_service Service for AWS V4 Signature Authorization. E.g. storage. "" ⬜️

Backend cache server

As a cache server, XCRemoteCache may use any REST server that supports PUT, GET and HEAD methods.

For the development phase, you can try the simplest cache server available as a docker image in backend-example. For the production environment, it is recommended to configure a reliable, fast server, preferrably located in a close proximity to developer's machines.

Out-of-the-box, XCRemoteCache supports V4 Signature Authorization used by Amazon's S3 and Google's GCS. Altenatively, if your server has a customized authentication procedure, you can add extra HTTP request headers with request_custom_headers configuration property.

Sample REST cache server from a docker image

To run a local instance of a server, use a snippet which exposes a cache endpoint under http://localhost:8080/cache:

docker build -t xcremotecache-demo-server backend-example
docker run -it --rm -d -p 8080:8080 --name xcremotecache xcremotecache-demo-server

As the docker image saves all files in a container non-persistent storage, to reset cache's content, just restart it:

# stop the container
docker kill xcremotecache
# run a new instance of the image
docker run -it --rm -d -p 8080:8080 --name xcremotecache xcremotecache-demo-server

To review all files stored in the cache server, navigate to the container's cache root directory:

docker exec -w /tmp/cache -it xcremotecache /bin/bash

Amazon S3 and Google Cloud Storage

XCRemoteCache supports Amazon S3 and Google Cloud Storage buckets to be used as cache servers using the Amazon v4 Signature Authorization.

To set it up use the configuration parameters aws_secret_key, aws_access_key, aws_region, and aws_service in the .rcinfo file. Specify the URL to the bucket in cache-addresses field in the same file.

Example

...
cache_addresses:
 - https://bucketname.s3.eu-central-1.amazonaws.com/
aws_secret_key: 
   
   
aws_access_key: 
   
   
aws_region: eu-central-1
aws_service: s3
...

Retention Policy: Buckets usually have a retention policy option which ensures objects are retained for a certain amount of time and won't be modified or deleted. Keep this option short or disable it to avoid errors in case multiple builds are done consecutively on the producer side for the same configuration.

CocoaPods plugin

Head over to our cocoapods-plugin docs to see how to integrate XCRemoteCache in your CocoaPods project.

Requirements

  • The repo under git version control
  • Xcode 11.4+
  • Xcode New Build System
  • Current Xcode location set by xcode-select
  • Using the default Xcode Toolchain
  • Recommended: multi-targets Xcode project
  • Recommended: do not use fast-forward PR strategy (use merge or squash instead)
  • Recommended: avoid DWARF with dSYM File "Debug Information Format" build setting. Use DWARF instead

Limitations

  • Swift Package Manager (SPM) projects are not supported
  • Filenames with _vers.c suffix are reserved and cannot be used as a source file
  • All compilation files should be referenced via the git repo root. Referencing /AbsolutePath/someOther.swift or ../../someOther.swift that resolve to the location outside of the git repo root is prohibited.

FAQ

Follow the FAQ page.

Development

Follow the Development guide. It has all the information on how to get started.

Release

To release a version, in Releases draft a new release with v0.3.0{-rc0} tag format. Packages with binaries will be automatically uploaded to the GitHub Releases page.

Building release package

To build a release zip package for a single platform (e.g. x86_64-apple-macosx, arm64-apple-macosx), call:

rake 'build[release, x86_64-apple-macosx]'

The zip package will be generated at releases/XCRemoteCache.zip.

Support

Create a new issue with as many details as possible.

Reach us at the #xcremotecache channel in Slack.

Contributing

We feel that a welcoming community is important and we ask that you follow Spotify's Open Source Code of Conduct in all interactions with the community.

Code of conduct

This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.

License

Copyright 2021 Spotify AB

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Security Issues?

Please report sensitive security issues via Spotify's bug-bounty program (https://hackerone.com/spotify) rather than GitHub.

Comments
  • Missing file Swift.h.md5 when building on consumer side

    Missing file Swift.h.md5 when building on consumer side

    My integration setup:

    • Automatic integration using xcprepare integrate ...

    Description

    • I have a FrameworkA with a dependency to FrameworkB
    • Producer has generated artifacts for both frameworks

    When building FrameworkA on consumer side, in the "RemoteCache_prebuild" build phase, the "xcprebuild" binary logs this error:

    Prebuild step failed with error: missingFile(file:///Users/me/Library/Developer/Xcode/DerivedData/MyApp-hcdhdsaluzstendufballcumqkgv/Build/Products/Debug-iphonesimulator/FrameworkB.framework/Headers/FrameworkB-Swift.h.md5)

    The README says I should move the "*-Swift.h.md5", but I'm not sure how and if it's even needed with the automatic integration.

    Am I missing something ?

    Other

    • I do have NS_ENUM exposed to Swift in my FrameworkB
    • In FrameworkB, I don't have a bridging header, but I have an umbrella header which imports a header file with the NS_ENUM

    Environment

    • XCRemoteCache: 0.3.18
    • HTTP cache server: demo docker
    • Xcode: 14.1
    opened by iSalah 7
  • Why $(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME) output file appears in Prebuild phase?

    Why $(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME) output file appears in Prebuild phase?

    In my project, sometimes error shows: error: /../derived_data/Build/Intermediates.noindex/ArchiveIntermediates/DemoProject/BuildProductsPath/Release-iphoneos/FooTarget.appex.dSYM/Contents/Resources/DWARF/FooTarget: No such file or directory where FooTarget is a dynamic lib

    I looked around logic about dsym, and I noticed there is an output file in Prebuild phase: image

    But what confused me is that its in Postbuild phase that the dysm file is actually linked to output file location: image

    So just wonder why is that?

    opened by CharlieSuP1 2
  • Remote cache cannot be used in consumer mode - local fingerprint does not match with remote one

    Remote cache cannot be used in consumer mode - local fingerprint does not match with remote one

    My integration setup

    • [x] Automatic integration using xcprepare integrate ...

    Expected/desired behavior

    The remote build cache is found and can be used in consumer mode. The local fingerprint should match the remote one.

    Minimal reproduction of the problem with instructions

    • Create X branch from a master
    • Make changes to the Swift code of the iOS project
    • Push changes to the X branch and build it
    • See the message from logs where "Remote cache cannot be used" because "Local fingerprint does not match with remote one"

    NOTE: If there are no changes to the iOS project code (regardless if this is a change to Swift or other filles), the cache is used and it gives a reasonable performance boost to Debug and AdHoc builds.

    Producer Logs

     Filtering the log data using "sender == "xcprepare""
    Timestamp               Ty Process[PID:TID]
    2022-11-11 10:16:00.943 I  xcprepare[2899:2c42] Extra config override failed with missingConfigurationFile(user.rcinfo -- file:///Users/distiller/project/IOS_PROJECT_NAME/). Skipping extra configuration
    2022-11-11 10:21:48.397 I  xcprepare[5853:5359] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5
    2022-11-11 10:22:14.361 I  xcprepare[6120:5628] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5
    Filtering the log data using "sender BEGINSWITH "xc""
    Timestamp               Ty Process[PID:TID]
    2022-11-11 10:16:00.943 I  xcprepare[2899:2c42] Extra config override failed with missingConfigurationFile(user.rcinfo -- file:///Users/distiller/project/IOS_PROJECT_NAME/). Skipping extra configuration
    2022-11-11 10:21:00.843 E  xcprebuild[5694:4f48] (Store) Prebuild step disabled, selected mode: producer
    2022-11-11 10:21:00.894 Df xcswiftc[5697:4f4c] Fallbacking to compilation using swiftc.
    2022-11-11 10:21:37.236 I  xcpostbuild[5787:5231] (Store) Found url to remapp: file:///Users/distiller/project/DerivedData/Build/Products/. Remapping: /Users/distiller/project/DerivedData/Build/Products
    2022-11-11 10:21:37.236 I  xcpostbuild[5787:5231] (Store) Found url to remapp: file:///Users/distiller/project/IOS_PROJECT_NAME/. Remapping: /Users/distiller/project/IOS_PROJECT_NAME
    2022-11-11 10:21:43.059 I  xcpostbuild[5787:5231] (Store) Making upload request to https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/file/83cb3d728d9fb9c1a4850cb701c9ddb3.zip with 3 retries.
    2022-11-11 10:21:46.115 I  xcpostbuild[5787:5231] (Store) Making upload request to https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/meta/3309eaa5d149c2c9f770f67b734db377dae83a06-Store-Debug-iphonesimulator-14A400-eccc143bfd3c1cd4f4c0d2842b7b3f1f.json with 3 retries.
    2022-11-11 10:21:48.397 I  xcprepare[5853:5359] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5
    2022-11-11 10:21:50.488 E  xcprebuild[5864:5384] (IOS_PROJECT_NAMEUITests) Prebuild step disabled, selected mode: producer
    2022-11-11 10:21:50.504 Df xcswiftc[5865:5386] Fallbacking to compilation using swiftc.
    2022-11-11 10:22:07.296 I  xcpostbuild[5884:54c0] (IOS_PROJECT_NAMEUITests) Found url to remapp: file:///Users/distiller/project/DerivedData/Build/Products/. Remapping: /Users/distiller/project/DerivedData/Build/Products
    2022-11-11 10:22:07.296 I  xcpostbuild[5884:54c0] (IOS_PROJECT_NAMEUITests) Found url to remapp: file:///Users/distiller/project/IOS_PROJECT_NAME/. Remapping: /Users/distiller/project/IOS_PROJECT_NAME
    2022-11-11 10:22:09.965 I  xcpostbuild[5884:54c0] (IOS_PROJECT_NAMEUITests) Making upload request to https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/file/bdba6cc8d2a19f991b8d0024a9f729d0.zip with 3 retries.
    2022-11-11 10:22:11.641 I  xcpostbuild[5884:54c0] (IOS_PROJECT_NAMEUITests) Making upload request to https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/meta/3309eaa5d149c2c9f770f67b734db377dae83a06-IOS_PROJECT_NAMEUITests-Debug-iphonesimulator-14A400-bfd512a3a8ee6ba690a014460dbe617f.json with 3 retries.
    2022-11-11 10:22:14.361 I  xcprepare[6120:5628] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5 

    Consumer Logs

     Filtering the log data using "sender == "xcprepare""
    Timestamp               Ty Process[PID:TID]
    2022-11-11 10:38:52.374 I  xcprepare[2464:215a] Extra config override failed with missingConfigurationFile(user.rcinfo -- file:///Users/distiller/project/IOS_PROJECT_NAME/). Skipping extra configuration
    2022-11-11 10:38:52.951 I  xcprepare[2464:215a] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:52.951 I  xcprepare[2464:215a] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:53.173 I  xcprepare[2464:215a] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:53.173 I  xcprepare[2464:215a] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:53.226 I  xcprepare[2464:215a] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:53.226 I  xcprepare[2464:215a] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:53.699 I  xcprepare[2464:215a] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5
    2022-11-11 10:38:53.699 I  xcprepare[2464:215a] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5
    2022-11-11 10:38:53.755 I  xcprepare[2464:215a] ClangWrapperBuilder compiles file at file:///var/folders/bl/wbxjgtzx7j5_mjsmfr3ynlc00000gp/T/xccc.c.
    2022-11-11 10:38:55.277 I  xcprepare[2464:215a] Clang compilation output:
    2022-11-11 10:38:55.939 I  xcprepare[2696:22b3] Extra config override failed with missingConfigurationFile(user.rcinfo -- file:///Users/distiller/project/IOS_PROJECT_NAME/). Skipping extra configuration
    2022-11-11 10:38:56.500 I  xcprepare[2697:22b5] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:56.500 I  xcprepare[2697:22b5] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:56.595 I  xcprepare[2697:22b5] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:56.595 I  xcprepare[2697:22b5] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:56.648 I  xcprepare[2697:22b5] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:56.648 I  xcprepare[2697:22b5] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:57.055 I  xcprepare[2697:22b5] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5
    2022-11-11 10:38:57.055 I  xcprepare[2697:22b5] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5
    2022-11-11 10:38:57.110 I  xcprepare[2697:22b5] ClangWrapperBuilder compiles file at file:///var/folders/bl/wbxjgtzx7j5_mjsmfr3ynlc00000gp/T/xccc.c.
    2022-11-11 10:38:57.615 I  xcprepare[2697:22b5] Clang compilation output:
    Filtering the log data using "sender BEGINSWITH "xc""
    Timestamp               Ty Process[PID:TID]
    2022-11-11 10:38:52.374 I  xcprepare[2464:215a] Extra config override failed with missingConfigurationFile(user.rcinfo -- file:///Users/distiller/project/IOS_PROJECT_NAME/). Skipping extra configuration
    2022-11-11 10:38:52.951 I  xcprepare[2464:215a] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:52.951 I  xcprepare[2464:215a] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:53.173 I  xcprepare[2464:215a] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:53.173 I  xcprepare[2464:215a] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:53.226 I  xcprepare[2464:215a] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:53.226 I  xcprepare[2464:215a] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:53.699 I  xcprepare[2464:215a] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5
    2022-11-11 10:38:53.699 I  xcprepare[2464:215a] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5
    2022-11-11 10:38:53.755 I  xcprepare[2464:215a] ClangWrapperBuilder compiles file at file:///var/folders/bl/wbxjgtzx7j5_mjsmfr3ynlc00000gp/T/xccc.c.
    2022-11-11 10:38:55.277 I  xcprepare[2464:215a] Clang compilation output:
    2022-11-11 10:38:55.939 I  xcprepare[2696:22b3] Extra config override failed with missingConfigurationFile(user.rcinfo -- file:///Users/distiller/project/IOS_PROJECT_NAME/). Skipping extra configuration
    2022-11-11 10:38:56.500 I  xcprepare[2697:22b5] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:56.500 I  xcprepare[2697:22b5] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:56.595 I  xcprepare[2697:22b5] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:56.595 I  xcprepare[2697:22b5] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:56.648 I  xcprepare[2697:22b5] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:56.648 I  xcprepare[2697:22b5] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/bucket-health/
    2022-11-11 10:38:57.055 I  xcprepare[2697:22b5] Checking HTTP file HEAD for https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5
    2022-11-11 10:38:57.055 I  xcprepare[2697:22b5] Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/marker/3309eaa5d149c2c9f770f67b734db377dae83a06-Debug-iphonesimulator-14A400-5
    2022-11-11 10:38:57.110 I  xcprepare[2697:22b5] ClangWrapperBuilder compiles file at file:///var/folders/bl/wbxjgtzx7j5_mjsmfr3ynlc00000gp/T/xccc.c.
    2022-11-11 10:38:57.615 I  xcprepare[2697:22b5] Clang compilation output:
    2022-11-11 10:44:06.823 E  xcprebuild[5657:48d6] (Store) Couldn't verify if should disable RC for 3309eaa5d149c2c9f770f67b734db377dae83a06.
    2022-11-11 10:44:06.829 I  xcprebuild[5657:48d6] (Store) Found url to remapp: file:///Users/distiller/project/DerivedData/Build/Products/. Remapping: /Users/distiller/project/DerivedData/Build/Products
    2022-11-11 10:44:06.829 I  xcprebuild[5657:48d6] (Store) Found url to remapp: file:///Users/distiller/project/IOS_PROJECT_NAME/. Remapping: /Users/distiller/project/IOS_PROJECT_NAME
    2022-11-11 10:44:06.829 I  xcprebuild[5657:48d6] (Store) Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/meta/3309eaa5d149c2c9f770f67b734db377dae83a06-Store-Debug-iphonesimulator-14A400-eccc143bfd3c1cd4f4c0d2842b7b3f1f.json
    2022-11-11 10:44:07.383 I  xcprebuild[5657:48d6] (Store)     Local fingerprint Fingerprint(raw: "7f7331398da0aac6f226664cee86d6a5", contextSpecific: "f7de4deca3879dab62427e7dd14593d0") does not match with remote one d96f8009a62cf5041ba1af1f56480fb7.
    2022-11-11 10:44:07.383 I  xcprebuild[5657:48d6] (Store) Remote cache cannot be used
    2022-11-11 10:44:07.454 I  xcswiftc[5660:48e0] Swiftc marker doesn't exist
    2022-11-11 10:44:07.454 Df xcswiftc[5660:48e0] Fallbacking to compilation using swiftc.
    2022-11-11 10:44:45.318 I  xcpostbuild[5745:4c85] (Store) Found url to remapp: file:///Users/distiller/project/DerivedData/Build/Products/. Remapping: /Users/distiller/project/DerivedData/Build/Products
    2022-11-11 10:44:45.319 I  xcpostbuild[5745:4c85] (Store) Found url to remapp: file:///Users/distiller/project/IOS_PROJECT_NAME/. Remapping: /Users/distiller/project/IOS_PROJECT_NAME
    2022-11-11 10:44:48.970 E  xcprebuild[5812:4d96] (IOS_PROJECT_NAMEUITests) Couldn't verify if should disable RC for 3309eaa5d149c2c9f770f67b734db377dae83a06.
    2022-11-11 10:44:48.977 I  xcprebuild[5812:4d96] (IOS_PROJECT_NAMEUITests) Found url to remapp: file:///Users/distiller/project/DerivedData/Build/Products/. Remapping: /Users/distiller/project/DerivedData/Build/Products
    2022-11-11 10:44:48.977 I  xcprebuild[5812:4d96] (IOS_PROJECT_NAMEUITests) Found url to remapp: file:///Users/distiller/project/IOS_PROJECT_NAME/. Remapping: /Users/distiller/project/IOS_PROJECT_NAME
    2022-11-11 10:44:48.979 I  xcprebuild[5812:4d96] (IOS_PROJECT_NAMEUITests) Making request https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/meta/3309eaa5d149c2c9f770f67b734db377dae83a06-IOS_PROJECT_NAMEUITests-Debug-iphonesimulator-14A400-bfd512a3a8ee6ba690a014460dbe617f.json
    2022-11-11 10:44:49.287 I  xcprebuild[5812:4d96] (IOS_PROJECT_NAMEUITests)     Local fingerprint Fingerprint(raw: "2907b625f1e944892665a44a3a7856a5", contextSpecific: "688c42fc064e8bcf48b4ce549e52805b") does not match with remote one 55fd71b5a47a3711be8f21fd297de83b.
    2022-11-11 10:44:49.287 I  xcprebuild[5812:4d96] (IOS_PROJECT_NAMEUITests) Remote cache cannot be used
    2022-11-11 10:44:49.349 I  xcswiftc[5814:4da5] Swiftc marker doesn't exist
    2022-11-11 10:44:49.349 Df xcswiftc[5814:4da5] Fallbacking to compilation using swiftc.
    2022-11-11 10:45:08.351 I  xcpostbuild[5831:4f15] (IOS_PROJECT_NAMEUITests) Found url to remapp: file:///Users/distiller/project/DerivedData/Build/Products/. Remapping: /Users/distiller/project/DerivedData/Build/Products
    2022-11-11 10:45:08.351 I  xcpostbuild[5831:4f15] (IOS_PROJECT_NAMEUITests) Found url to remapp: file:///Users/distiller/project/IOS_PROJECT_NAME/. Remapping: /Users/distiller/project/IOS_PROJECT_NAME 

    Environment

    • XCRemoteCache: 0.3.17
    • cocoapods-xcremotecache: -
    • HTTP cache server: Google Cloud Storage (GCS)
    • Xcode: 14.0.0

    Post build stats

     
    hit_count: 0
    miss_count: 2
    local_cache_bytes: 118784
    indexing_hit_count: 0
    indexing_miss_count: 0 

    Others

    I tried to debug an issue with https://github.com/spotify/XCRemoteCache/blob/master/docs/FAQ.md#troubleshooting-cache-misses guide but was no luck.

    Also I tried to experiment with cache_commit_history and artifact_maximum_age flags - but no luck. See the latest .rcinfo

    primary_repo: [email protected]:PROJECT/IOS_PROJECT_NAME.git
    primary_branch: master
    cache_addresses:
     - https://IOS_PROJECT_NAME-xcode-remote-cache.storage.googleapis.com/
    cache_health_path: bucket-health/
    cache_commit_history: 100
    artifact_maximum_age: 0
    request_custom_headers: 
     Authorization: "Bearer ***"
      
    opened by pp-gtroshin 7
  • error: virtual filesystem overlay file 'xxx/all-product-headers.yaml' not found

    error: virtual filesystem overlay file 'xxx/all-product-headers.yaml' not found

    My integration setup

    [✅] CocoaPods cocoapods-xcremotecache plugin [ ] Automatic integration using xcprepare integrate ... [ ] Manual integration [ ] Carthage

    Expected/desired behavior consumer can use po expression when debug in Xcode.

    Minimal reproduction of the problem with instructions There has two same local git repo, with different folder path, one for producer, another for consumer.

    STEPS:

    1. clear Xcode DerivedData, build and run using Xcode app inproducer project. It run po expression well.
    2. clear XCRemoteCache cache and Xcode DerivedData, build and run using Xcode inconsumer project, it hit all caches and run well. However, when I run po expression, it log error.
    error: expression failed to parse:
    error: virtual filesystem overlay file '/Users/lyon/Library/Developer/Xcode/DerivedData/iOSTemplate-cdzlxgwuidvlmxbkkaadsgdulfkn/Build/Intermediates.noindex/iOSTemplate.build/Debug-iphoneos/iOSTemplate.build/all-product-headers.yaml' not found
    error: virtual filesystem overlay file '/Users/lyon/Library/Developer/Xcode/DerivedData/iOSTemplate-cdzlxgwuidvlmxbkkaadsgdulfkn/Build/Intermediates.noindex/iOSTemplate.build/Debug-iphoneos/iOSTemplate.build/all-product-headers.yaml' not found
    
    error: couldn't IRGen expression. Please check the above error messages for possible root causes.
    

    The folder name called iOSTemplate-cdzlxgwuidvlmxbkkaadsgdulfkn is producer's derivedData folder. Then I checked the XCRemoteCache artifacts caches using grep -r iOSTemplate-cdzlxgwuidvlmxbkkaadsgdulfkn /Users/lyon/Library/Caches/XCRemoteCache/10.1.125.142/cache/iOSTemplate/file/4ffc488943069a16d3146f6e131d6e9c/RxSwift, and found the absolute path contains in binary files. And I found nothing about all-product-headers.yaml in the cache, it makes me confused.

    Pods/Carthage file

    source 'https://cdn.cocoapods.org/'
    

    platform :ios, '13.0' inhibit_all_warnings! use_modular_headers!

    use_frameworks!

    xcremotecache

    def remote_cache_config(finalTarget, configuration, mode, enabled) config = { 'enabled' => enabled, 'cache_addresses' => ["http://10.1.125.142:8080/cache/#{finalTarget}"], 'primary_repo' => '[email protected]:xxx/xcremotecache-demo.git', 'mode' => mode, 'exclude_build_configurations' => ['Release'], 'primary_branch' => 'test/dynamic' } if mode == 'producer' config['final_target'] = finalTarget elsif mode == 'consumer' config['check_platform'] = 'iphoneos' config['check_build_configuration'] = configuration end xcremotecache(config) puts "[XCRC CONFIG]:\n #{config}\n" end

    xcrc_target_default = 'iOSTemplate' xcrc_configuration_default = 'Debug' xcrc_mode_default = 'consumer' xcrc_enabled_default = true xcrc_target = (ENV['XCRC_TARGET'].nil? || ENV['XCRC_TARGET'].empty?) ? xcrc_target_default : ENV['XCRC_TARGET'] xcrc_configuration = (ENV['XCRC_CONFIGURATION'].nil? || ENV['XCRC_CONFIGURATION'].empty?) ? xcrc_configuration_default : ENV['XCRC_CONFIGURATION'] xcrc_mode = (ENV['XCRC_MODE'].nil? || ENV['XCRC_MODE'].empty?) ? xcrc_mode_default : ENV['XCRC_MODE'] xcrc_enabled = ENV['XCRC_ENABLED'].nil? ? xcrc_enabled_default : (ENV['XCRC_ENABLED'] == 'true') plugin 'cocoapods-xcremotecache' remote_cache_config(xcrc_target, xcrc_configuration, xcrc_mode, xcrc_enabled)

    target 'iOSTemplate' do pod 'RxSwift', '~> 5.0' pod 'SnapKit', '~> 4.0' pod 'SDWebImage', '~> 5.0' end

    post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' config.build_settings['ENABLE_BITCODE'] = 'NO' config.build_settings['CODE_SIGN_IDENTITY'] = '' # fix Xcode 14 bundle targets in pod project codesign error end end end

    Environment

    • XCRemoteCache: 0.3.17
    • cocoapods-xcremotecache: 0.0.14
    • **HTTP cache server:**docker
    • Xcode: 14.0 (14A309)
    opened by bandaoxiatian 4
  • Support using swiftinterface to determine whether invalidate binary cache.

    Support using swiftinterface to determine whether invalidate binary cache.

    Let's say module A depends on module B,so in A's meta file(which all A's dependencies are listed), line "B.swiftmodule.md5" is contained.

    So in consumer mode, if any code change in B module occurs, module B.swiftmodule.md5 is changed, thus triggers A's cache invalidation. And module A is compiled locally(other than use remote cache).

    Is there any possibility that:if module B is compiled with "build_library_for_distribution",then A use B's swiftinterface(other than swiftmodule.md5) to be its dependency. If so, is module changes are constrained internally ( no public or open api changes), module A can still use remote cache.

    enhancement 
    opened by CharlieSuP1 4
Releases(v0.3.18)
Owner
Spotify
Spotify
Cache - Nothing but Cache.

Cache doesn't claim to be unique in this area, but it's not another monster library that gives you a god's power. It does nothing but caching, but it does it well. It offers a good public API with out-of-box implementations and great customization possibilities. Cache utilizes Codable in Swift 4 to perform serialization.

HyperRedink 2.7k Dec 28, 2022
Apple Asset Cache (Content Cache) Tools

AssetCacheTool A library and tool for interacting with both the local and remote asset caches. This is based on research I did a few years ago on the

Kenneth Endfinger 21 Jan 5, 2023
🏈 Cache CocoaPods for faster rebuild and indexing Xcode project.

Motivation Working on a project with a huge amount of pods I had some troubles: - Slow and unnecessary indexing of pods targets, which implementation

Vyacheslav Khorkov 487 Jan 5, 2023
A library and tool for interacting with both the local and remote asset caches.

Asset Cache Tool A library and tool for interacting with both the local and remote asset caches. This is based on research I did a few years ago on th

Kenneth Endfinger 20 Dec 23, 2022
CachyKit - A Caching Library is written in Swift that can cache JSON, Image, Zip or AnyObject with expiry date/TTYL and force refresh.

Nice threadsafe expirable cache management that can cache any object. Supports fetching from server, single object expire date, UIImageView loading etc.

Sadman Samee 122 Dec 28, 2022
Cachyr A typesafe key-value data cache for iOS, macOS, tvOS and watchOS written in Swift.

Cachyr A typesafe key-value data cache for iOS, macOS, tvOS and watchOS written in Swift. There already exists plenty of cache solutions, so why creat

Norsk rikskringkasting (NRK) 124 Nov 24, 2022
Carlos - A simple but flexible cache, written in Swift for iOS 13+ and WatchOS 6 apps.

Carlos A simple but flexible cache, written in Swift for iOS 13+ and WatchOS 6 apps. Breaking Changes Carlos 1.0.0 has been migrated from PiedPiper de

National Media & Tech 628 Dec 3, 2022
MemoryCache - type-safe, thread-safe memory cache class in Swift

MemoryCache is a memory cache class in swift. The MemoryCache class incorporates LRU policies, which ensure that a cache doesn’t

Yusuke Morishita 74 Nov 24, 2022
A lightweight generic cache for iOS written in Swift with extra love for images.

Haneke is a lightweight generic cache for iOS and tvOS written in Swift 4. It's designed to be super-simple to use. Here's how you would initalize a J

Haneke 5.2k Dec 29, 2022
High performance cache framework for iOS.

YYCache High performance cache framework for iOS. (It's a component of YYKit) Performance You may download and compile the latest version of sqlite an

null 2.3k Dec 16, 2022
Everyone tries to implement a cache at some point in their iOS app’s lifecycle, and this is ours.

Everyone tries to implement a cache at some point in their app’s lifecycle, and this is ours. This is a library that allows people to cache NSData wit

Spotify 1.2k Dec 28, 2022
Track is a thread safe cache write by Swift. Composed of DiskCache and MemoryCache which support LRU.

Track is a thread safe cache write by Swift. Composed of DiskCache and MemoryCache which support LRU. Features Thread safe: Implement by dispatch_sema

Cheer 268 Nov 21, 2022
UITableView cell cache that cures scroll-lags on cell instantiating

UITableView + Cache https://github.com/Kilograpp/UITableView-Cache UITableView cell cache that cures scroll-lags on a cell instantiating. Introduction

null 73 Aug 6, 2021
Fast, non-deadlocking parallel object cache for iOS, tvOS and OS X

PINCache Fast, non-deadlocking parallel object cache for iOS and OS X. PINCache is a fork of TMCache re-architected to fix issues with deadlocking cau

Pinterest 2.6k Dec 28, 2022
💾 Simple memory & disk cache

Cache ?? Simple memory & disk cache Usage ??‍?? Default let cache = Cache<String>() try memory.save("MyValue", forKey: "MyKey") let cached = try cac

SeongHo Hong 2 Feb 28, 2022
Cache library for videos for React Native

@lowkey/react-native-cache Cache everything Installation npm install @lowkey/react-native-cache Usage import ReactNativeCache from "@lowkey/react-nati

Max Prokopenko 1 Oct 1, 2021
CachedAsyncImage is the simplest way to add cache to your AsyncImage.

CachedAsyncImage ??️ CachedAsyncImage is AsyncImage, but with cache capabilities. Usage CachedAsyncImage has the exact same API and behavior as AsyncI

Lorenzo Fiamingo 278 Jan 5, 2023
A simple cache that can hold anything, including Swift items

CacheIsKing CacheIsKing is a simple cache that allows you to store any item, including objects, pure Swift structs, enums (with associated values), et

Christopher Luu 13 Jan 22, 2018
A simple but flexible cache

Carlos A simple but flexible cache, written in Swift for iOS 13+ and WatchOS 6 apps. Breaking Changes Carlos 1.0.0 has been migrated from PiedPiper de

National Media & Tech 628 Dec 3, 2022