How to use the clearCache function from ejs

Find comprehensive JavaScript ejs.clearCache code examples handpicked from public code repositorys.

95
96
97
98
99
100
101
102
103
let ejs = require('ejs'),
    LRU = require('lru-cache');
ejs.cache = LRU(100); // LRU cache with 100-item limit
```

*If you want to clear the EJS cache, call ejs.clearCache. If you're using the LRU cache and need a different limit, simple reset ejs.cache to a new instance of the LRU.*

### Custom file loader
The default file loader is fs.readFileSync, if you want to customize it, you can set ejs.fileLoader.
fork icon33
star icon76
watch icon1