Pārlūkot izejas kodu

Documented external caching API inline

pull/731/head
Andrew Leedham pirms 6 gadiem
vecāks
revīzija
a746e071ea
1 mainītis faili ar 8 papildinājumiem un 0 dzēšanām
  1. +8
    -0
      mustache.mjs

+ 8
- 0
mustache.mjs Parādīt failu

@@ -669,9 +669,17 @@ var mustache = {
Scanner: undefined,
Context: undefined,
Writer: undefined,
/**
* Allows a user to override the default caching strategy, by providing an
* object with set, get and clear methods. This can also be used to disable
* the cache by setting it to the literal `undefined`.
*/
set templateCache (cache) {
defaultWriter.templateCache = cache;
},
/**
* Gets the default or overridden caching object from the default writer.
*/
get templateCache () {
return defaultWriter.templateCache;
}


Notiek ielāde…
Atcelt
Saglabāt