Closed hrasoa closed 7 years ago
If you are using the runtimeCaching
option, you can assign a different cache name to each entry:
runtimeCaching: [{
urlPattern: /\/articles\//,
handler: 'fastest',
options: {
cache: {
maxEntries: 10,
name: 'articles-cache' // Choose whatever name you want.
}
}
}]
This is useful because you might apply a different strategy or a difference cache expiration limit to different types of requests that are cached at runtime, and using a different cache name reflects those different approaches.
For the precached entries, I don't think there's a significant value to be had from being able to create individually named caches. The precaching logic applies equally to all resources.
Ok thanks
It would be good to have multiple cacheNames for storing items by category, example:
/posts/1
, ... )