memcached

Memcache on windows, error php5.dll not found

I use php 5.3.0 and after hours of searching found a php_memcache.dll that is compiled for that version, now as I start php it gives me an error "The program can't start because php5.dll is missing from your computer. Try reinstalling the program to fix the problem." As I see it there is php5ts.dll in php folder, and I can't find php5.dl...

Should I store item rating and item data in separated memcache keys?

Hello, Lets suppose that we have some kind of items and these items could be rated by users. Should I store item rating and item data in different memcache keys? Logically, we should keep rating out of main item data, because item data changes very rarely, but rating changes more often. When somebody rates the item I should invalidate ...

wanting a good memory + disk caching solution

I'm currently storing generated HTML pages in a memcached in-memory cache. This works great, however I am wanting to increase the storage capacity of the cache beyond available memory. What I would really like is: memcached semantics (i.e. not reliable, just a cache) memcached api preferred (but not required) large in-memory first leve...

Caching suds-object. Unicode problem

I'm using suds https://fedorahosted.org/suds/ to fetch data using SOAP. I'd like to cache the result (using memcached) to not overload the server from where I'm fetching the data. The problem is when fetching the cached data. Fetching it works fine but then django tries to decode the data (force_unicode) and it fails with the following: ...

Multi-Application Server Environment and Memcached Security

We are looking to integrate Memcached into our infrastructure, but have a security concern before we do. We run several platforms including ASP.NET and ColdFusion and have many app developers working many little applications across the different platforms. The concern is this: App A places item "dog" into cache. App B reads item "dog" ...

Referenced Model Loading in Google App Engine

Hello, In Python, say I've got a model of class A that has a ReferenceProperty b to model class B, which has a ReferenceProperty c to model class C. Assuming an instance of A already exists in the datastore, I can get it by saying: q = A.all() a = q.get() In this scenario, how does entity loading work? Is a.b retrieved when a is ret...

Rails.cache.fetch, Symbols, & Memcached

I have a rails 2.3.4 app and a line that looks like: temp = Rails.cache.fetch(:temp_id) { User.find_by_name('Temp').id } and everything worked fine, until I decided to switch the caching layer to memcached by adding the following to my environment.rb: config.cache_store = :mem_cache_store Now the line which used to work fine gives...

Page-view-counter with Rails and Memcached

Hi! I'm trying to implement a page-views-counter with Rails and memcached. Every time I render a page, through rails I increase a memcached key (key.incr is atomic). My main worry is the possibility where this key gets expired or deleted from memcached before I update my DB record. Even if I visit all the keys with frequency greater tha...

Memcached rails api - multi set support

Is there a way to set multiple keys of a Memcached instance in one call in Rails? i.e. cache.set_multi("k1" => "v1", "k2" => "v2") ...

How is JPA and Memcached different?

[UPDATED] Hi, I am trying to figure out the difference between Memcached and JPA, this is what I infer from the information I have Memcached: Cache data and objects in memory, like an on the fly database to quickly access the data. This layer is just above the actual db (say my sql). It has its own columns and rows, where can you kee...

High Cache Miss From Memcache When Storing Sessions

We have been having problems with the memcache server storing sessions data, the cache miss was about 20%, therefore we added in another pool of memcache servers, but now the cache miss rate is up to 50%. Any possible cause or solutions for this problem? ...

Selecting an appropriate cache mechanism

My setup: 4 webservers Static content server (NFS mount) 2 db servers 2 "do magic" servers An additional 8 machines designated multi-purpose. I'm writing a wrapper for three caching mechanisms so that they can be used in a somewhat normalized manner: Filesystem, Memcached and APC. I'm trying to come up with examples for use (and what...

How can I refer to different environment's inside Symfony's ProjectConfiguration.class.php

I have a staging and development environment on the same machine. I would like to configure a different memcached port in ProjectConfiguration.class.php depending on my environment. I imagine its not safe to use $SERVER['HTTP_HOST'] inside of the ProjectConfiguration file because that won't account for tasks run from the command line. W...

How to cache SQLAlchemy results?

Suppose I have a mapped class Article and I have a mapped class Author. Article.author is a relation on Author that returns the author of the Article. How do I make Article.author to cache the value in memcached? The problem is that referring to Article.author does an SQL query each time it is called, but there is really no need to quer...

How to update data in memcache when persistent object is updated in GAE

Perhaps I'm missing something simple, as I believe that this is a common scenario... When I am working with an object retrieved from the datastore, I want to detect any changes to the object and update the memcache. In a non-JDO scenario this would be easy, as any data logic layer would intercept all updates and thus have a chance to u...

Md5 cache keys in Memcache

In this reddit blog post, the author talks about MD5ing the cache keys and hence the reason why they find it very difficult to scale out. Can someone tell me why one would want to md5 cache keys? I didn’t understand the reason even though they explained it as “A few years ago, we decided to md5 all of our cache keys. We did t...

How to load a session by its id in rails?

Im having a hard time trying to figure out how to load a session by its id. I don't want the current_user session, I need to load another one (mostly because flash doesnt share sessions with the browser). So I'm passing the session_id forward with the parameters, how do I get the session in the other side? Authlogic is redirecting me to ...

Using memcache with PHP

I want to start using memcache with PHP (on Ubuntu 9.10). There are lots of info online which appear to show how to do this. Suprisingly though, none of the articles (I have seen so far), explicitly state whether you need to RUN the memcache process BEFORE attempting to use it or whether by simply calling new MemCache() via the PHP clien...

PHP: tmpfs vs memcached

Hello, I want to store information (sessions and a lot of strings) in RAM and I don't know if I should use a tmpfs or a memcached server. Someone did some benchmark and knows which one is faster? It's needed for some ajax scripts that requests informations every 1-5 seconds per user who is logged in, like a webchat in PHP. So PHP has to ...

What is the best way to store an ActiveRecord object in memcached?

There are currently two problems with storing ActiveRecord objects in memcached. The Undefined Class/Module problem (Google search). From what I've read up, this is still a bug that nobody has a real good solution for. The cache_fu plugin has probably the best solution for this, wrapping its retrieve call in a block that tries to catc...