nodebb-plugin-tenor-gif 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/library.js +4 -6
  2. package/package.json +2 -2
package/library.js CHANGED
@@ -8,15 +8,13 @@ const websockets = require('./websockets');
8
8
  const nconf = require.main.require('nconf');
9
9
  const meta = require.main.require('./src/meta');
10
10
  const slugify = require.main.require('./src/slugify');
11
- const cacheCreate = require.main.require('./src/cacheCreate');
11
+ const ttlCache = require.main.require('./src/cache/ttl');
12
12
 
13
13
  const plugin = module.exports;
14
14
 
15
- plugin._cache = cacheCreate({
16
- name: 'gifs',
17
- max: 20,
18
- length: function (n) { return n.length; },
19
- maxAge: 1000 * 60 * 60, // 1 hour
15
+ plugin._cache = ttlCache({
16
+ name: 'tenor-gif',
17
+ ttl: 1000 * 60 * 60, // 1 hour
20
18
  });
21
19
 
22
20
  plugin.init = async (params) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-tenor-gif",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "readmeFilename": "README.md",
23
23
  "nbbpm": {
24
- "compatibility": "^1.6.0 || ^2.0.0"
24
+ "compatibility": "^2.4.0"
25
25
  },
26
26
  "dependencies": {
27
27
  "@commitlint/cli": "^9.1.2",