Coder Social home page Coder Social logo

Memcached support? about nuxt-ssr-cache HOT 8 CLOSED

arash16 avatar arash16 commented on May 22, 2024
Memcached support?

from nuxt-ssr-cache.

Comments (8)

1hakr avatar 1hakr commented on May 22, 2024 1

Awesome, its working. Thanks a ton @arash16

from nuxt-ssr-cache.

arash16 avatar arash16 commented on May 22, 2024

@1hakr sure, tomorrow I'll add it.

from nuxt-ssr-cache.

1hakr avatar 1hakr commented on May 22, 2024

@arash16 thanks a lot! Eagerly waiting for it.

from nuxt-ssr-cache.

arash16 avatar arash16 commented on May 22, 2024

@1hakr just published it, let me know if everything works as expected.

from nuxt-ssr-cache.

1hakr avatar 1hakr commented on May 22, 2024

I tried i but i'm getting this error

 ERROR  Cannot read property 'isCacheableValue' of undefined                                                                                                    17:58:01

  at MemcachedClient.isCacheableValue (node_modules/cache-manager-memcached-store/index.js:143:20)
  at node_modules/cache-manager/lib/multi_caching.js:228:22
  at node_modules/async/lib/async.js:181:20
  at Object.async.forEachOf.async.eachOf (node_modules/async/lib/async.js:233:13)
  at Object.async.forEach.async.each (node_modules/async/lib/async.js:209:22)
  at Object.setInMultipleCaches (node_modules/cache-manager/lib/multi_caching.js:220:15)
  at node_modules/nuxt-ssr-cache/lib/middleware.js:69:17
  at process._tickCallback (internal/process/next_tick.js:68:7)

Also i see you have not added any test cases.

from nuxt-ssr-cache.

arash16 avatar arash16 commented on May 22, 2024

@1hakr sorry I didn't have time to write tests.
However I did test it with a live beta version of our site and it was working fine.
Can you provide some code, so that I can reproduce that error?

from nuxt-ssr-cache.

1hakr avatar 1hakr commented on May 22, 2024
  cache: {
    useHostPrefix: true,
    store: {
      type: 'multi',
      stores: [
        {
          type: 'memory',
          max: 2000,
          ttl: 3600
        },
        {
          type: 'memcached',
          options: {
            hosts: ['127.0.0.1:11211']
          }
        }
      ]
    },
    pages: ['/']
  }

The error was happening only when using multiple stores

from nuxt-ssr-cache.

arash16 avatar arash16 commented on May 22, 2024

@1hakr it's a bug with underlying library that I have used.
I have fixed it for now and opened a pull request with that library to be fixed.

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.