Subtract a delta of 2 minutes from cache file mtime during comparison with project mtime#29
Conversation
with project mtime due to issue with updating "last_activity_at". @see: https://gitlab.com/gitlab-org/gitlab-ce/issues/22213
|
Thanks for your contribution. This sounds like a reasonable fix for 8.7.1 to 8.12. In this context, adding a delay of 1h+ seems too heavy and would make caching useless on any infra with a light-to-moderate level of activity, so this fix couldn't be adapted to 8.12+. However, I'm open to give the freedom to users. Would you mind slightly modifying your PR so the delay can be configured and add the explanation and use cases in the documentation? (README) Until there is a better alternative (although I don't know what a good alternative could be...), it sounds like an acceptable workaround to me. |
|
Oh, that's bad... Great that you found this out. |
|
Thanks, ping me when you push your modifications so I can see them right away. FYI, in #21 (comment), SautdeChat suggested using the System Hook API to register a hook that could be used to invalidate the cache. Which sounds like a great solution. |
Since version 8.7.1 Gitlab updates
project.last_activity_atnot more often than once in a minute.This leads to the problem, when project.last_activity_at < last commit datetime, and therefore to not updating the packages.json.
@see: https://gitlab.com/gitlab-org/gitlab-ce/issues/22213