Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only homepage caching #12

Open
ozergul opened this issue Sep 16, 2019 · 5 comments
Open

Only homepage caching #12

ozergul opened this issue Sep 16, 2019 · 5 comments

Comments

@ozergul
Copy link
Contributor

ozergul commented Sep 16, 2019

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.

@sonofmagic
Copy link

sonofmagic commented Sep 17, 2019

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

The author shows it in README.md

@ozergul
Copy link
Contributor Author

ozergul commented Sep 17, 2019

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

@sonofmagic
Copy link

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

@dongwuqiang
Copy link

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?

@ozergul
Copy link
Contributor Author

ozergul commented Sep 24, 2019

no, memory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants