Jump to content

File Cache vs memcached


Tony

Recommended Posts

Havenswift might have a better answer, as he has experience with real-world server operations.

But on my developer environment, with a lightly loaded server, I perceive no difference between files, memcached, and redis (another memory-based cache manager).

However, I did notice that CubeCart's reporting of cache usage is basically worthless for memcached and redis. These two 'daemons' answer usage queries with 'whole-server, cumulative' values. Thus, on a shared server, the usage reported goes up and up and up and up aggregated from every hosting account that uses this method. Thus, clearing the cache, while actually deleting the memorized data, does not reset the usage data back to zero.

 

Link to comment
Share on other sites

If you have memcached available to you in your hosting (most generic hosts will not enable this - we do on all our servers !) then always use it.  Memory based caching is faster than file based caching and on busy sites or sites hosted on shared servers (which would apply to almost all CubeCart sites) then it takes a big load off of the disk sub-system which is always the slowest component in any hosting environment.

In a dev system as Brian is running, there wont be any noticeable difference

REDIS is nice software but is even less likely to be available to users on shared hosting and has no advantages over memcached for CubeCart users (CubeCart doesnt use any of the vast range of additional functionality available in REDIS).  We dont use REDIS now with CubeCart customers although do make it available for our Magento clients where it is used for Full Page Cache !

Link to comment
Share on other sites

Thanks @havenswift-hosting for the reply, good to hear that!

Yes, my web host allows me to spin up memcache and set the memory size. (What's the best memory size I should set it up?)

Then I use this line in the host name like this: 

unix:///home/user/apps/myappname/memcached.sock

Port: 0

And according to them, that should work. I am going to be trying this tonight as the shop is currently busy with visitors visiting it.

Link to comment
Share on other sites

3 minutes ago, havenswift-hosting said:

Memcached memory is set at the server level, it doesnt use port 0 (nothing does) and have no idea what you / they mean by adding that line into your "host name" !

I can set it to whatever I need to set it when I configure it. (that's how flexible my web host is)

For port, I assume I leave it blank.

And for the hostname, they do not have a hostname, but a shared memcache across (with the option to set the memory limit on my site - I have up to 1GB) and I just need to use its existing .sock file to make the connection. That's in theory as I have not tested this yet.

Link to comment
Share on other sites

Just had a play about with the settings and speaking to my web hosting support, we have got it to work using this:

$glob['memcached_servers'] = array(array('/home/xxxxxxxxx/apps/xxxxxxxxx/xxxxxxxx.sock',0,0));

It's now filling up the cache. 👍

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...