memcached

Will PHP load all files references in a page?

I am working on a cache class, I would like to be able to set and get cached items from 5 different storage mediums. Memcache, APC cache, file cache, sessions, cookies. Maybe even a 6th (database could be added as a 6th). My goal is to make this flexible enough that I can use it in the future on many projects very easily (portable). ...

What is compression for in PHP's Memcache?

On PHP.net I am looking at the Memcache::set function and it has this optional flag to use compression... Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib). $memcache_obj->set('var_key', 'some really big variable', MEMCACHE_COMPRESSED, 50); I am curious...

Help with PHP call_user_func and integrate function into Class?

Below is a function I found about a year ago that is supposed to put a lock on a memcache key so you can update it's value without any trouble of 2 request trying to update the key at the same time. It is pretty basic but I could use a little help in figuring out how to use it 100%. The part I am not sure about is where it passes in ...

Using Memcache as a counter for multiple objects

I have a photo-hosting website, and I want to keep track of views to the photos. Due to the large volume of traffic I get, incrementing a column in MySQL on every hit incurs too much overhead. I currently have a system implemented using Memcache, but it's pretty much just a hack. Every time a photo is viewed, I increment its photo-hits...

cannot store values into memcache

Hi, I am running apache+php+memcache on suse 10.1. I can connect Ok to memcached on port 11211, but I cannot do getVersion, add, get, etc. Error message [Thu Jan 21 14:38:15 2010] [error] [client ] PHP Notice: Memcache::add() [<a href='function.Memcache-add'>function.Memcache-add</a>]: Server localhost (tcp 11211) failed with: Failed ...

key value stores for extendable objects

http://www.infoq.com/presentations/newport-evolving-key-value-programming-model is a video about KV stores, and the whole premise is that redis promotes a column-based style for storing the attributes of an object under separate keys rather than serialising an object and storing it under a single key. (This question is not redis-specifi...

Failed to load mod_mem_cache.so

I am trying to load mod_mem_cache.so in SUSE Linux Enterprise Server 11, by doing LoadModule memcache /path/to/mem_cache.so. But I got this: httpd2: Syntax error on line 113 of /etc/apache2/httpd.conf: Syntax error on line 43 of /etc/apache2/sysconfig.d/loadmodule.conf: Can't locate API module structure `memcache' in file /usr/lib/p...

Is threadcaching faster than memcaching?

I recently plugged memcaching into my PHP web software. I have a class, Cache, that manages storing things in my memcache pool. In that class, I also maintain an member array--a "threadcache"--that stores up to 100 of the most-used items. My question is, is threadcaching going to be faster than memcaching? I would think so, coming from ...

Is there anyway to serilize linq object for Memcached?

I'm just start switching to memcached and currently on testing with memcached. I'm having 2 object, I created an object and put [Serializable] on it (for instance, let call this Object1), the other object is created using Linq DBML (Object2).. I tried to memcached List<Object1>, it work just fine, like charm, everything here is cache ...

What do you recomend for distributed cache linq to sql object?

http://stackoverflow.com/questions/2122081/is-there-anyway-to-serilize-linq-object-for-memcached I asked a question previously here, but really no one help out on this. I was wondering is there anyway to cache linq to sql object... like List or something similar, where there are hierachy... I tried most Wraper for memcached and it does ...

Memcached failing to set

Really weird one going on here. Recently, my memcached instance basically stopped setting keys and data. Like 99% of things just silently fail, when before, completely worked before. Is there any way to fix this guys? I try setting a key named 'a' with the data 'test', and it still just fails and doesn't set. It has been working for mo...

Problems compiling memcached_functions_mysql

I am trying to compile package memcached_functions_mysql-1.1.tag.gz I downloaded and installed libmemcached in /usr/lib/ on running ./configure --with-mysql=/home/y/bin/mysql_config --libdir=/home/y/lib/mysql/ --with-libmemcached=/usr/lib/memcached.so.2.0.0 in the memcached_functions_mysql directory I get error: message checking for li...

Implementation of Drupal Memcache in custom modules

Hi, I am developing lots of custom modules for my web application and needs to implement memcache with it. I have installed and enabled memcache module in my drupal installation but now I have to see what data is being cached. Is there any additional work required to cache my module specific data? Also, What is the exact work flow of c...

How can you update a fragment cache while allowing reads from the cache during the update?

Is there a way to refresh a fragment cache in a way that allows reads from the cache while the update is taking place? I'm caching a part of an html.erb view in Rails with the cache do .. end block in erb. I'm expiring the same cache in the controller, with a call to expire_fragment(:controller => 'controllername') I'm using memcached...

How to use memcached from codeigniter

Hi all, How to use memcached from codeigniter, and how to store session data to memcached. Please help me. Thanks ...

recv-q and send-q between spawning+memcached gets bloated after a few hours

I'm using python-memcached 1.45 with python 2.5.2, django 1.0.4, spawning 0.9.2, eventlet 0.9.3 and libevent 1.3 on 64bit debian lenny. spawning server is started with parameters given below: /usr/bin/python /usr/bin/spawn --factory=spawning.django_factory.config_factory myproject.settings \ --port=8006 --processes=1 --threads=0 --st...

Drupal: Views cache and memcached

I'm using memcached with the page max set to 15 minutes. Does this mean that views cache is pointless? If I have a 5 minute views cache, it would be meanginless because the page itself wouldn't update for 15 minutes, is that how it goes? Thanks. ...

How much memory of Memcache is available to a Google App Engine account?

Google App Engine has some information about Memcache limits: http://code.google.com/appengine/docs/quotas.html#Memcache & http://code.google.com/appengine/docs/python/memcache/overview.html#Quotas_and_Limits . However, total allowed size of RAM/memory store for a single application is not specified. It's known that no objects above 1MB ...

Browser Tab/Window tracking pattern?

Is there an accepted pattern for tracking that a page is being loaded by the same tab/window? There are certain processes (like stepped submission processes), which can greatly benefit from a ability to verify that the same tab is asking for execution. For example, there are places where (between steps) we store intermediate data in me...

Memcached rubygem + Rlibmemcached argument error with memcache_mget()

I am getting an exception when using Evan Weaver's Memcached gem (as Memcached::Rails.new) -> (http://github.com/fauna/memcached) and calling get_multi() ArgumentError: wrong # of arguments(2 for 4) from /usr/local/lib/ruby/gems/1.8/gems/memcache-auth-1.0.1/lib/memcached/memcached.rb:384:in `memcached_mget' from /usr/local/lib/ruby/gems...