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

Feature Request: Add support for Memcached and Amazon ElastiCache #47

Open
ethanpil opened this issue Dec 24, 2013 · 38 comments
Open

Feature Request: Add support for Memcached and Amazon ElastiCache #47

ethanpil opened this issue Dec 24, 2013 · 38 comments

Comments

@ethanpil
Copy link

Instead of storing the cache files on disk, how about an option for storing them in memory?

APC/APCu / Memcached

http://we-love-php.blogspot.com/2013/02/php-caching-shm-apc-memcache-mysql-file-cache.html

@jaswrks
Copy link

jaswrks commented Dec 28, 2013

+1 for memcache (this would also make QC compatible with ElastiCache from AWS).

Next Actions

  • Create a new abstract class for cache read/write operations; e.g., getCache(), setCache(), deleteCache(), purgeCache().
  • Build a new class that extends the abstraction. One which implements and better organizes the existing cache methodology that ZenCache uses currently. This will become one (of many) caching methods that ZenCache will support moving forward.
  • Build a new class that extends the abstraction. Once which implements an in-memory cache using the memcached extension for PHP. http://php.net/manual/en/book.memcached.php
  • Adjust the ZenCache source code so that all cache reads/writes/deletes go through a wrapper that will inspect the current configuration of the site; using a particular caching methodology that has been configured.
  • Use this class as an example of how to use a pool of Memcached servers (i.e., one or more) that can live locally or be hosted on another server in a private network.

@raamdev
Copy link
Contributor

raamdev commented Feb 26, 2014

Memcached and ElastiCache support sounds like a great idea. I'm adding this feature request to my todo list.


I'm also copying the following notes from @JasWSInc that he left on Issue #54 which may be relevant when working on this feature request.

@raamdev I think it would be nice to expose a way for site owners to break out of this ABSPATH jail in certain scenarios. In the case reported here, a symlink should do the job. However, if a site owner wanted to use something like Amazon's ElastiCache; a symlink wouldn't be enough. A site owner would need to have the ability to change the root path to what is actually an external server in the case of ElastiCache. http://aws.amazon.com/elasticache/

selection_001


Other Considerations....

The current benefit of having an ABSPATH root hard-coded into the Quick Cache plugin...

  • If you import/export your Quick Cache options from one site to another, there is no root path in your options configuration; and thus, it's more portable. i.e. a site owner only configures the local path, and not the full server path.

That's not super important, so perhaps we can improve the flexibility offered by this setting in a future release. Ideally, in a way that would not negatively impact the import/export feature currently offered by QC Pro.

@ethanpil
Copy link
Author

Please don't leave out APC/APCu as an option here. Perhaps a good option would be an abstraction that can talk to a variety of caching systems...

Something like this:
http://www.phpfastcache.com/

Or one of these options?
http://stackoverflow.com/questions/6100186/looking-for-a-php-caching-library-with-multiple-back-end-storage-adapters

@raamdev
Copy link
Contributor

raamdev commented Jun 9, 2014

Cachify allows you to cache via "DB, HDD, APC or Memcached": http://wordpress.org/plugins/cachify/

Definitely planning to add support for at least APC and Memcached to Quick Cache.

@aziernest
Copy link

almost an year, no update for memcache ?

Anyways, +1 for memcache, I 'm looking for a memcache!

@raamdev
Copy link
Contributor

raamdev commented Mar 6, 2015

Pasting notes here from Jason regarding adding Memcache support to ZenCache Pro:

Integrating a Memcache option should be relatively painless. We have most of the work needed to implement Memcache already in place; i.e. we have all cache purging, clearing, wiping, and directory deletions going through just a couple two or three wrappers.

The next step that I suggest is to create wrappers for all cache writes too. With this in place, we can then take a look at integrating Memcache as an option. The wrappers can be made to detect a Memcache-enabled option, and use Memcache for all cache reads/writes.


Memcache keys can simply follow the existing standard that we use for building a cache path in the file system; only it will be in memory instead of in the local file system.


Referencing: "Difference between Memcache and Memcached": http://stackoverflow.com/questions/1442411/when-should-i-use-memcache-instead-of-memcached

http://php.net/manual/en/book.memcache.php
http://php.net/manual/en/book.memcached.php


Referencing Memcache tutorial: https://rtcamp.com/tutorials/php/memcache/

@HandyGadget
Copy link

+1111111 (ooops my finger slipped) for Memcached/

@tokar86a
Copy link

tokar86a commented May 5, 2015

Yes this should be something

@gjonsson
Copy link

+1 for Memcached!

@timreeves
Copy link

YAPO (yet another plus 1) for memcached!

@isaumya
Copy link

isaumya commented May 15, 2015

It would be great :) +1 👍

@jaswrks
Copy link

jaswrks commented May 15, 2015

So great to see all of these votes for Memcached. I can't wait to see this added to ZenCache; i.e., move away from disk writes and see the speed increase with memory allocation being used instead. On the AWS platform, in particular, this seems to make a lot of sense. cc @raamdev

@jaswrks
Copy link

jaswrks commented May 18, 2015

Adding a list of next actions above ↑

@raamdev raamdev modified the milestones: Next Release (Pro), Future Release Jul 10, 2015
@xberg
Copy link

xberg commented Jul 29, 2015

You can force to use memory by mounting the WordPress cache folder to tmpfs. I do this with zencache's cache folder and it is now served by memory.
What would memcache bring more to the table? I use memcache for object caching and tmpfs for zencache.

@raamdev raamdev modified the milestones: Next Release (Lite), Future Release (Lite) Sep 30, 2015
@raamdev raamdev removed this from the Next Release milestone Oct 7, 2016
@raamdev raamdev modified the milestones: Next Release, Future Release Nov 22, 2016
@raamdev raamdev modified the milestones: Next Release, Future Release Jan 21, 2017
@jpSimkins
Copy link

+1 just purchased the Pro Unlimited version. Can't wait for this release for Memcache

@raamdev
Copy link
Contributor

raamdev commented May 15, 2017

Just a quick note here for everyone subscribed to this GitHub issue: The next release of Comet Cache Pro will include support for Memcached / AWS ElastiCache and since we could use all the help we can get testing this new feature we're doing something special this time around and opening the next Comet Cache Pro Beta to everyone, even non-Pro customers.

If you're not a Pro customer and you're interested in helping test this feature, please send an email to support@cometcache.com with the following subject line: "I want to help test Issue #47" I'll send you an email with details as soon as a beta version is available for testing (within the next week or so).

2017-04-26_13-03-54

raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue May 15, 2017
@xberg
Copy link

xberg commented May 15, 2017

This is fantastic news! I'm a pro user and will report back on this when it's released. I was using tmpfs up until now.

@jpSimkins
Copy link

I can't wait to test this out!

@xberg
Copy link

xberg commented Jun 1, 2017

Hi,
When is this releasing?
Many thanks!

@xberg
Copy link

xberg commented Jun 29, 2017

Hi,
Any info on realease date?
thanks

@raamdev
Copy link
Contributor

raamdev commented Jul 3, 2017

@xberg We're hoping to have a release out within the next week or two. This GitHub issue will be updated once a release occurs.

@konjusina
Copy link

Hi Raam,
to be honest i am disappointed.

Your support is, well not only late but also not really helping.
I had conversations with some of your colleagues already and ended up with solving my problems with Comet Cache myself.
I paid 150 $ or so for my PRO account but there is nothing really PRO about it.

It seams that i will switch to the FREE version of W3 Cache.
Not only that Apcu is missing in Comet, it´s damn slow in filling the Cache, not really intelligent in Cache cleaning (purge) and the minifier functions break my CSS, JS.

All in all – not good.

You´ve go an unhappy paying customer here.

Regards

Robert

@jpSimkins
Copy link

jpSimkins commented Aug 4, 2017

@konjusina How is this constructive to this topic? It's not, you are just complaining. This is not the place. GitHub is not meant to be used in this manner. You just look like a troll. Use the proper channels to report distaste for the product. Good Luck with W3 Cache. As for breaking CSS and JS. There are most likely other issues in play. You will experience the same with W3 as I have too. Plus your account seems fake as you have nothing on it. So pretty much, you're a troll.

Back on topic, any news on this release?

@raamdev
Copy link
Contributor

raamdev commented Aug 5, 2017

@konjusina You've opened 6 tickets with us over the past two months and our entire team has spent a considerable amount of time answering your questions and helping you figure problems that you have admitted to us are due to the theme that you're using on your site. I'm sorry that Comet Cache is not working out for you, but abusing our support reps by using profanity in your tickets is not a friendly or professional way to get a response. Also, as @jpSimkins mentioned above, this is not the place for those sort of comments. If you need a place to vent, please post feedback on our community forum. Any further off-topic comments here on GitHub will be deleted.


On topic: An update on Memcached release

I sincerely apologize for the delays. We expected to have a release out a lot sooner, but our small team has been unexpectedly busy. I promise to have a Release Candidate published within the next few days that includes the new Memcached integration. Thanks so much for your patience!

@wpsharks wpsharks deleted a comment from konjusina Aug 8, 2017
@jpSimkins
Copy link

jpSimkins commented Aug 8, 2017

@konjusina I am in no way affiliated to Comet Cache. I am a customer like you. I think you do not understand what gitHub is. It is a place for coders to discuss project issues and make suggestions. This is not a place to leave feedback bashing a project. Use forums for this. Your comment has nothing to do with the ticket you posted in. You are simply irate and are in the wrong place to vent. This is most likely why your comments are deleted... Just be glad they left some up, I'd delete them all personally. Go to the forums if you want to act like that. This place is meant to be collaboration or constructive feedback. You are simply complaining with nothing on topic. Learn how to use this site before you post on it. I don't care if you think I am being rude. You have already been rude in your first comment which, again, has nothing to do with this ticket. Even your follow up comment is off-topic... I know I am only feeding a troll...

Back on topic (note the subject of the thread): Will this update have support for AWS ElastiCache?
I know you are adding Memcache but how about Redis?

raamdev added a commit that referenced this issue Aug 8, 2017
- **New Feature: Memcached / RAM** (Pro): Comet Cache Pro now includes support for Memcached / AWS ElastiCache to serve the cache directly from RAM. This allows for a faster cache delivery than what is possible when serving the cache via disk. Memcached / AWS ElastiCache can be configured from **Dashboard → Comet Cache Pro → Plugin Options → RAM / Memcached**. See [Issue #47](#47)
- **Enhancement**: Added `Referrer-Policy` to whitelist for cachable HTTP headers. See [Issue #892](#892).
- **Bug Fix** (Pro): The Cache Statistics feature was broken when the PHP `disk_total_space()` and/or `disk_free_space()` functions were disabled by the PHP configuration. Comet Cache now handles this scenario gracefully by hiding disk-related stats when those functions are not allowed. See [Issue #775](#775)
- **Bug Fix** (Pro): The HTML Compressor was returning an empty string upon encountering an invalid UTF-8 sequence. See [Issue #871](#871) reported by a Comet Cache user.
- **Compatibility** (Pro): Many improvements to the Pro software update system, including changes to the API Endpoints and the Proxy Fallback endpoint. See [Issue #879](#879) and [Issue #315](wpsharks/comet-cache-pro#315) for full details.
- **Compatibility**: Fixed a WooCommerce compatibility issue that was generating a "Notice: id was called incorrectly. Product properties should not be accessed directly." Props @vestaxpdx. See [Issue #896](#896).
@raamdev
Copy link
Contributor

raamdev commented Aug 8, 2017

@jpSimkins Yes, the new Memcached integration should work fine with AWS ElastiCache.

@raamdev
Copy link
Contributor

raamdev commented Aug 8, 2017

Comet Cache v170808-RC (Release Candidate)

A release candidate has been published that includes the new Memcached support. Please see the announcement for details. Note that the Memcached integration is a Pro-only feature.

@konjusina
Copy link

@ramdev,
thank you.
I will use the forum or send you guys a mail.
@jpSimkins
You should go and wash your mouth.

@konjusina
Copy link

The reason i came here in the firts place was to ask if there is a chance that Comet would support Apcu any time soon. The memcached option sounds gret but it seems my provider does not support this. They do offer Opcache and Apcu.

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

No branches or pull requests