wpsharks / comet-cache

An advanced WordPress® caching plugin inspired by simplicity.
https://cometcache.com
GNU General Public License v3.0
77 stars 18 forks source link

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

Open ethanpil opened 10 years ago

ethanpil commented 10 years ago

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 commented 10 years ago

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

Next Actions

raamdev commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 9 years ago

almost an year, no update for memcache ?

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

raamdev commented 9 years ago

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 commented 9 years ago

+1111111 (ooops my finger slipped) for Memcached/

tokar86a commented 9 years ago

Yes this should be something

gjonsson commented 9 years ago

+1 for Memcached!

timreeves commented 9 years ago

YAPO (yet another plus 1) for memcached!

isaumya commented 9 years ago

It would be great :) +1 :+1:

jaswrks commented 9 years ago

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 commented 9 years ago

Adding a list of next actions above ↑

xberg commented 9 years ago

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.

rdanamcd commented 8 years ago

I have memcached installed and running on the server. Currently don't access it yet. With this feature implemented, will transients be able to access the memcached server through Zencache? Or will I need to use a separate plugin like https://wordpress.org/plugins/memcached-is-your-friend/ . Thanks!

xberg commented 8 years ago

@rdanamcd : these are completely different things. Memcached is your friend is there for transients and object cache (I highly recommend activating this: it really is plug and forget). Zencache does not deal with those. Zencache is a page cache engine. Today Zencache uses disk to save the pages (or you can use my workaround as explained above). I suggested it should natively support Memcache for also page caching. Memcache could then manage page expiration and will be a LOT faster than using disk.

xberg commented 8 years ago

I also use Redis as transient / object caching so I would very much appreciate support for Redis as well.

carstenwawer commented 8 years ago

+1 for Memcached/Redis-Support for CometCache!

theperfectwill commented 8 years ago

:+1:

xberg commented 8 years ago

As I wrote back in July I do not understand the purpose of memcache / redis here. You can simply move the whole cache folder to a memory folder and that's all done: no more disk access. See my note from July which then made it to a knowledge base article: 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.

timreeves commented 8 years ago

@xberg I quite understand your point, and I could do it myself - but will I make the effort? And what about other people with less skills at the OS level? To get memcached or redis servers running is - on Ubuntu/Debian at least - simply a matter of installing one package, and it runs. Redis is the only system being mentioned here which offers persistence. But it is also not the fastest option, as data is passed via TCP or Unix Sockets. Which for the WP Cache is needless overkill, as it can be rebuilt at the drop of a hat. What I normally do in similar cases is use Nginx + PHP-FPM, and then shared memory via APCu. That way, the shared memory is in the space of the master FPM process and shared with its children, so that's really efficient - low on memory, low on needless repetition, very fast on access. That said, first you need to compile APCu and load it (as a PHP module), so using a temp filesystem in memory is probably not more challenging then getting APCu running, and also not much different in speed.

AJ1976 commented 8 years ago

+1 for Memcached support in the GUI (Redis support would be great too). We generally don't have access to our clients' servers (nor do they), so mounting the cache folder to tmpfs is rarely an option. In instances in which Memcached is available on the server, we generally install W3TC instead of Comet Cache.

In different terms, this is about 10 sales of Comet Cache Pro per day that you -- and we -- are missing out on.

eojeel commented 8 years ago

Another +1 for memcache support.

jpSimkins commented 7 years ago

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

raamdev commented 7 years ago

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

xberg commented 7 years ago

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 commented 7 years ago

I can't wait to test this out!

xberg commented 7 years ago

Hi, When is this releasing? Many thanks!

xberg commented 7 years ago

Hi, Any info on realease date? thanks

raamdev commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

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

jpSimkins commented 7 years ago

@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 commented 7 years ago

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

raamdev commented 7 years ago

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 commented 7 years ago

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

konjusina commented 7 years ago

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.