mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-06 12:20:56 +01:00
LRU semantic for workdir cache (#1735)
Introduces a maximum size for the simple workdir cache. On cache overflow workdirs are evicted using an LRU strategy. Furthermore parallel requests for the same repository will now block until the workdir is released.
This commit is contained in:
20
docs/en/administration/workdir_caching.md
Normal file
20
docs/en/administration/workdir_caching.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: Caching for Working Directories
|
||||
---
|
||||
|
||||
SCM-Manager offers commands to modify repositories on the server side. For example this is used by the
|
||||
[Editor Plugin](https://www.scm-manager.org/plugins/scm-editor-plugin/) and the
|
||||
[Review Plugin](https://www.scm-manager.org/plugins/scm-review-plugin/). Without further configuration, this is done
|
||||
by cloning/checking out the repository temporarily, performing the change, creating a commit and pushing the changes
|
||||
back to the central repository. The larger the repositories, the longer this may take.
|
||||
|
||||
To speed up such changes a lot, SCM-Manager offers a strategy where the local clones will be cached and reused for
|
||||
subsequent requests. This strategy caches up to a configurable amount of clones (but at most one per repository).
|
||||
To enable this strategy, add the system property `scm.workingCopyPoolStrategy` to the value
|
||||
`sonia.scm.repository.work.SimpleCachingWorkingCopyPool`:
|
||||
|
||||
```bash
|
||||
-Dscm.workingCopyPoolStrategy=sonia.scm.repository.work.SimpleCachingWorkingCopyPool
|
||||
```
|
||||
|
||||
The maximum capacity of the cache can be set using the property `scm.workingCopyPoolSize` (the default is 5).
|
||||
@@ -22,6 +22,7 @@
|
||||
- /administration/logging/
|
||||
- /administration/scm-server/
|
||||
- /administration/reverse-proxies/
|
||||
- /administration/workdir_caching/
|
||||
|
||||
- section: Development
|
||||
entries:
|
||||
|
||||
Reference in New Issue
Block a user