Coder Social home page Coder Social logo

Only homepage caching about nuxt-ssr-cache HOT 5 OPEN

arash16 avatar arash16 commented on May 22, 2024
Only homepage caching

from nuxt-ssr-cache.

Comments (5)

sonofmagic avatar sonofmagic commented on May 22, 2024 2

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

The author shows it in README.md

from nuxt-ssr-cache.

sonofmagic avatar sonofmagic commented on May 22, 2024 1

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

from nuxt-ssr-cache.

ozergul avatar ozergul commented on May 22, 2024

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

from nuxt-ssr-cache.

dongwuqiang avatar dongwuqiang commented on May 22, 2024

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?

from nuxt-ssr-cache.

ozergul avatar ozergul commented on May 22, 2024

no, memory

from nuxt-ssr-cache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.