You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1051,6 +1051,33 @@ Every node runs this algorithm independently. The access log is moved along with
1051
1051
1052
1052
#### Configuration of eviction mechanisms
1053
1053
1054
+
Here is a simple configuration block for `olricd.yaml`:
1055
+
1056
+
```
1057
+
cache:
1058
+
numEvictionWorkers: 1
1059
+
maxIdleDuration: ""
1060
+
ttlDuration: "100s"
1061
+
maxKeys: 100000
1062
+
maxInuse: 1000000 # in bytes
1063
+
lRUSamples: 10
1064
+
evictionPolicy: "LRU" # NONE/LRU
1065
+
```
1066
+
1067
+
You can also set cache configuration per DMap. Here is a simple configuration for a DMap named `foobar`:
1068
+
1069
+
```
1070
+
dmaps:
1071
+
foobar:
1072
+
maxIdleDuration: "60s"
1073
+
ttlDuration: "300s"
1074
+
maxKeys: 500000 # in-bytes
1075
+
lRUSamples: 20
1076
+
evictionPolicy: "NONE" # NONE/LRU
1077
+
```
1078
+
1079
+
If you prefer embedded-member deployment scenario, please take a look at [config#CacheConfig](https://godoc.org/github.com/buraksezer/olric/config#CacheConfig) and [config#DMapCacheConfig](https://godoc.org/github.com/buraksezer/olric/config#DMapCacheConfig) for the configuration.
0 commit comments