There is some cost to dictionaries, so it seems to be worth caching them (especially with .dic
+.aff
).
Dictionaries will go to a specific directory and actions/cache will track the directory.
The dictionary retrieval code can choose to skip retrieving any file(s) it already has.
Each dictionary's ETAG will be stored.
Use the ETAG to retrieve (or not) the content.
The code doesn't currently handle the case that there is no etag from the server, that should be added (in the interim, please use servers that generate etags...)
- You can get a list of caches using actions/cache: list-github-actions-caches-for-a-repository
- You can delete a cache entry by id using actions/cache: delete-a-github-actions-cache-for-a-repository-using-a-cache-id
Caches are accessible below workflows on the actions page of each repository and can be deleted directly.
There have been a couple of iterations so far... Layouts 1 and 2 (with etags) don't handle collisions in dictionary names particularly well...
dictionary/
- {sha}/
- {extension}
- ...
urls/
- {random}/
- raw.url
- resolved.url
- etag
- sha
- ...
-
Given a new unresolved url.
-
Resolve it.
-
Check
urls/*/resolved.url
to see if it is already present (=> 6). -
Create
urls/{random}
. -
Write
raw.url
andresolved.url
to the directory. -
Use the matching
urls/{random}
directory. -
Use the etag (if available) to see if it's current (=> done).
-
Save the file to a temp.
-
Calculate the sha.
-
Write the new
etag
andsha
to the directory (from 6). -
Write
dictionary/{sha}/{extension}
({sha}
from 9,{extension}
from 2).
- detect any
directory/{sha}
for which there is no urls/{*}/sha containing that value and delete it. - detect any
urls/{*}/sha
for which there's more than oneurls/{*}
with the samesha
file value and warn about it.
FAQ | Showcase | Event descriptions | Configuration information | Known Issues | Possible features | Deprecations | Release notes | Helpful scripts