File: cache.jsdoc

package info (click to toggle)
node-ejs 3.1.10%2B~3.1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,144 kB
  • sloc: javascript: 2,476; makefile: 5
file content (37 lines) | stat: -rw-r--r-- 803 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
 * A JavaScript function cache. This is implemented by the lru-cache module
 * on NPM, so you can simply do `ejs.cache = LRU(10)` to get a
 * least-recently-used cache.
 *
 * @interface Cache
 * @global
 */

/**
 * Cache the intermediate JavaScript function for a template.
 *
 * @function
 * @name Cache#set
 * @param {String}   key key for caching
 * @param {Function} val cached function
 */

/**
 * Get the cached intermediate JavaScript function for a template.
 *
 * If the cache does not contain the specified key, `null` shall be returned.
 *
 * @function
 * @name Cache#get
 * @param {String}   key key for caching
 * @return {null|Function}
 */

/**
 * Reset the entire cache.
 *
 * Erases the entire cache. Called by {@link module:ejs.clearCache}
 *
 * @function
 * @name Cache#clear
 */