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

Memcached support? #7

Closed
1hakr opened this issue May 24, 2019 · 8 comments
Closed

Memcached support? #7

1hakr opened this issue May 24, 2019 · 8 comments

Comments

@1hakr
Copy link

1hakr commented May 24, 2019

Do you have plans to add memcached? I have tried to add it but it doesnt seem to work. I would love to see that implemented.

@arash16
Copy link
Owner

arash16 commented May 24, 2019

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

@1hakr
Copy link
Author

1hakr commented May 25, 2019

@arash16 thanks a lot! Eagerly waiting for it.

@arash16
Copy link
Owner

arash16 commented May 25, 2019

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

@1hakr
Copy link
Author

1hakr commented May 25, 2019

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.

arash16 added a commit that referenced this issue May 25, 2019
@arash16
Copy link
Owner

arash16 commented May 25, 2019

@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?

@1hakr
Copy link
Author

1hakr commented May 25, 2019

  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

@arash16
Copy link
Owner

arash16 commented May 25, 2019

@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.

@1hakr
Copy link
Author

1hakr commented May 25, 2019

Awesome, its working. Thanks a ton @arash16

@arash16 arash16 closed this as completed May 26, 2019
Gryen7 pushed a commit to Gryen7/nuxt-ssr-cache that referenced this issue Dec 10, 2019
Gryen7 pushed a commit to Gryen7/nuxt-ssr-cache that referenced this issue Dec 10, 2019
Gryen7 pushed a commit to Gryen7/nuxt-ssr-cache that referenced this issue Dec 10, 2019
Gryen7 pushed a commit to Gryen7/nuxt-ssr-cache that referenced this issue Dec 10, 2019
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

2 participants