File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
adminforth/documentation/docs/tutorial Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ adminforth-facebook-oauth-adapter adminforth-keycloak-oauth-adapter adminforth-m
55adminforth-twitch-oauth-adapter adminforth-image-generation-adapter-openai adminforth-storage-adapter-amazon-s3 \
66adminforth-storage-adapter-local adminforth-image-vision-adapter-openai adminforth-key-value-adapter-ram \
77adminforth-login-captcha-adapter-cloudflare adminforth-login-captcha-adapter-recaptcha adminforth-completion-adapter-google-gemini \
8- adminforth-key-value-adapter-redis"
8+ adminforth-key-value-adapter-redis adminforth-key-value-adapter-leveldb "
99
1010# for each
1111install_adapter () {
Original file line number Diff line number Diff line change @@ -264,7 +264,26 @@ const adapter = new RedisKeyValueAdapter({
264264 redisUrl: ' 127.0.0.1:6379'
265265})
266266
267- adapeter .set (' test-key' , ' test-value' , 120 );
267+ adapeter .set (' test-key' , ' test-value' , 120 ); // expiry in 120 seconds
268+
269+ ```
270+
271+ ### LevelDB adapter
272+
273+ ``` bash
274+ npm i @adminforth/key-value-adapter-leveldb
275+ ```
276+
277+ LebelDB uses local storage for storing keys.
278+
279+ ``` ts
280+ import LevelDBKeyValueAdapter from ' @adminforth/key-value-adapter-leveldb'
281+
282+ const adapter = new LevelDBKeyValueAdapter ({
283+ dbPath: ' ./testdb'
284+ });
285+
286+ adapeter .set (' test-key' , ' test-value' , 120 ); // expiry in 120 seconds
268287
269288```
270289
You can’t perform that action at this time.
0 commit comments