Skip to content
This repository was archived by the owner on Apr 9, 2026. It is now read-only.

Close #8: Implement caching#14

Merged
cmb69 merged 1 commit into
php:mainfrom
cmb69:cmb/caching
Sep 30, 2024
Merged

Close #8: Implement caching#14
cmb69 merged 1 commit into
php:mainfrom
cmb69:cmb/caching

Conversation

@cmb69

@cmb69 cmb69 commented Sep 29, 2024

Copy link
Copy Markdown
Member

For now we cache only the PHP SDK, the PHP binaries and the development packs. This already greatly improves the setup performance (it might easily safe a minute or two, in case of cache hits). To be able to use the current PHP revision as part of the cache key, we factor out determine-revision.ps1. We create a separate cache for the PHP-SDK since this likely rarely changes, and since the cached variant is apparently much faster than fetching a GH release of the PHP-SDK.

Since clients may not want to use the cache, possibly because they have already a lot of other files in their caches, we explicitly require clients to opt-in via the cache input parameter.


I encourage all users of setup-sdk-action to try this out. See https://github.com/php/pecl-database-dbase/actions/runs/11094514089 for a demonstation; php-sdk-2.3.0, php-7.4.33-x64-ts and php-8.4.0RC1-x64-ts had already been cached prior to this run; still a nice performance improvement for the other PHP versions. Now compare that with your setup times (likely two to four minutes per job).

For now we cache only the PHP SDK, the PHP binaries and the development
packs.  This already greatly improves the setup performance (it might
easily safe a minute or two, in case of cache hits).  To be able to use
the current PHP revision as part of the cache key, we factor out
determine-revision.ps1.  We create a separate cache for the PHP-SDK
since this likely rarely changes, and since the cached variant is
apparently much faster than fetching a GH release of the PHP-SDK.

Since clients may not want to use the cache, possibly because they have
already a lot of other files in their caches, we explicitly require
clients to opt-in via the `cache` input parameter.
@cmb69
cmb69 merged commit d07cd98 into php:main Sep 30, 2024
@cmb69
cmb69 deleted the cmb/caching branch September 30, 2024 12:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants