Skip to content

Commit 869fc97

Browse files
committed
Caching Mechanism described
1 parent 338c5f7 commit 869fc97

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/polish-the-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
timeout-minutes: 10
2727
steps:
2828
- name: Invoke the Prettier fix
29-
uses: WorkOfStan/prettier-fix@v1.1.1
29+
uses: WorkOfStan/prettier-fix@v1.1.2
3030
with:
3131
commit-changes: true
3232

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,12 @@ permissions:
5050
| Output | Description |
5151
| ------------- | ----------------------------------- |
5252
| `branch-name` | The name of the branch created/used |
53+
54+
## Caching Mechanism
55+
56+
To optimize execution time, the `vendor` folder is cached, allowing dependencies to be reused across workflow runs. The cache key is generated based on:
57+
58+
- `composer.json` – to track dependency changes.
59+
- The runner's OS and PHP version – to account for environment-specific variations.
60+
61+
This approach enables cache sharing across branches. However, if the `composer.json` file in the referenced branch (e.g., `dev`) changes, it's recommended to **invalidate the cache** to ensure a fresh `vendor` folder is built from scratch.

0 commit comments

Comments
 (0)