lektor / lektor-website

The main lektor website.
https://www.getlektor.com/
Other
160 stars 134 forks source link

Document the XDG_CACHE_HOME environment variable #324

Closed paternal closed 2 years ago

paternal commented 3 years ago

Page https://www.getlektor.com/docs/deployment/travisci/ describes how to cache the lektor directory, but the same method cannot be used with Gitlab pages. This pull request explains an alternative method which works with Gitlab.

dairiki commented 3 years ago

You might want to note that setting XDG_CACHE_HOME will also affect the location of caches generated by other programs. E.g. the settings in your example .gitlab-ci.yml will also result in the pip wheel cache being cached. (In general, that’s probably a good thing, but it’s good to be aware that that’s happening.)

FWIW, to avoid surprises, my personal preference is to explicitly call out which caches are being cached. e.g.

variables:
    XDG_CACHE_HOME: "$CI_PROJECT_DIR/_cache"
cache:
    paths:
      - _cache/pip
      - _cache/lektor
paternal commented 3 years ago

@dairiki I agree :) 3220662

dairiki commented 2 years ago

Merged. Thank you, @paternal!