1. 23 Dec, 2016 1 commit
  2. 20 Dec, 2016 2 commits
  3. 19 Dec, 2016 1 commit
  4. 16 Dec, 2016 3 commits
  5. 15 Dec, 2016 2 commits
  6. 14 Dec, 2016 1 commit
  7. 08 Dec, 2016 1 commit
  8. 06 Dec, 2016 1 commit
  9. 02 Dec, 2016 1 commit
  10. 29 Nov, 2016 1 commit
  11. 23 Nov, 2016 5 commits
  12. 21 Nov, 2016 1 commit
    • Yorick Peterse's avatar
      Refactor cache refreshing/expiring · f10e7ac7c903
      Yorick Peterse authored
      This refactors repository caching so it's possible to selectively
      refresh certain caches, instead of just expiring and refreshing
      everything.
      
      To allow this the various methods that were cached (e.g. "tag_count" and
      "readme") use a similar pattern that makes expiring and refreshing
      their data much easier.
      
      In this new setup caches are refreshed as follows:
      
      1. After a commit (but before running ProjectCacheWorker) we expire some
         basic caches such as the commit count and repository size.
      
      2. ProjectCacheWorker will recalculate the commit count, repository
         size, then refresh a specific set of caches based on the list of
         files changed in a push payload.
      
      This requires a bunch of changes to the various methods that may be
      cached. For one, data should not be cached if a branch used or the
      entire repository does not exist. To prevent all these methods from
      handling this manually this is taken care of in
      Repository#cache_method_output. Some methods still manually check for
      the existence of a repository but this result is also cached.
      
      With selective flushing implemented ProjectCacheWorker no longer uses an
      exclusive lease for all of its work. Instead this worker only uses a
      lease to limit the number of times the repository size is updated as
      this is a fairly expensive operation.
      f10e7ac7c903
  13. 18 Nov, 2016 5 commits
  14. 17 Nov, 2016 4 commits
  15. 16 Nov, 2016 4 commits
  16. 15 Nov, 2016 1 commit
  17. 14 Nov, 2016 1 commit
  18. 11 Nov, 2016 1 commit
  19. 09 Nov, 2016 3 commits
  20. 07 Nov, 2016 1 commit