MCPcopy
hub / github.com/CacheControl/json-rules-engine / getCacheKey

Method getCacheKey

src/fact.js:85–91  ·  view source on GitHub ↗

* Generates the fact's cache key(MD5 string) * Returns nothing if the fact's caching has been disabled * @param {object} params - parameters that would be passed to the computation method * @return {string} cache key

(params)

Source from the content-addressed store, hash-verified

83 * @return {string} cache key
84 */
85 getCacheKey (params) {
86 if (this.options.cache === true) {
87 const cacheProperties = this.cacheKeyMethod(this.id, params)
88 const hash = Fact.hashFromObject(cacheProperties)
89 return hash
90 }
91 }
92}
93
94Fact.CONSTANT = 'CONSTANT'

Callers 2

_setFactValueMethod · 0.80
factValueMethod · 0.80

Calls 1

hashFromObjectMethod · 0.80

Tested by

no test coverage detected