nuxt-ssr-cache icon indicating copy to clipboard operation
nuxt-ssr-cache copied to clipboard

Only homepage caching

Open ozergul opened this issue 5 years ago • 5 comments

Hello I want to cache only my home page that is "/"

How can I do this?

    pages: [
      // you can also pass a regular expression to test a path
      '/'
    ],

The code above is caching all pages.

ozergul avatar Sep 16 '19 16:09 ozergul

// to cache only root route, use a regular expression /^/$/

The author shows it in README.md

sonofmagic avatar Sep 17 '19 05:09 sonofmagic

How can I see that the cache is working? Are there any logging?

ozergul avatar Sep 17 '19 11:09 ozergul

I use it in my product , it actually works. but i don't know how to get this cache instance maybe we should inject this page-cache into context like context.$pageCache then we can do 'get' ,'set','del',and log it

sonofmagic avatar Sep 18 '19 09:09 sonofmagic

Hello I want to cache only my home page that is "/"

How can I do this?

    pages: [
      // you can also pass a regular expression to test a path
      '/'
    ],

The code above is caching all pages.

what type of store you use? redis?

dongwuqiang avatar Sep 24 '19 09:09 dongwuqiang

no, memory

ozergul avatar Sep 24 '19 09:09 ozergul