memcached

SQLAlchemy: writing to database after the response has been sent

I have a simple service that does approximately the following: An HTTP client connects to the server The server writes the sessionID of the client and the timestamp to the database, and in most cases just returns an empty response (The cases when it does do real work and return actual data are irrelevant to this question) In order t...

REST API caching, should I use a Reverse proxy or memcache(d)?

I have a REST API where I would like to cache the JSON response of the index (GET /foo) and the read actions (GET /foo/1) to significantly increase the performance. When there is a POST or a PUT on a resource the cache entries for the index and read results need to be expired, so no old content is served. Is this a scenario that's best ...

Memcached always miss (rails)

Hi Stackoverflowers, I have spent way too much time on this issue to keep my sanity so it is time to ask for help... I have a class with this method: def telecom_info Rails.cache.fetch("telecom_info_for_#{ref_num}", :expires_in=> 3.hours) do info = Hash.new(0) Telecom::SERVICES.each do |source| results = Tele...

High Performance PHP

I am about to launch a CodeIgniter web application. Any recommendations on what I should do to maximize performance of my application? I'm thinking memcached and an accelerator (though I am not sure which one). Suggestions? ...

Do I need external 2nd level cache for multiple NHibernate instances in Windows Azure?

I am developing AMF Flash gateway on FlourineFx application for deployment on Windows Azure and I want to use Azure SQL. I use NHibernate 2.1 + NHibernate.Linq 1.0 + FluentNHibernate 1.1 There will be two or more instances of this FlourineFx gateway and only 1 database. I am planning on implementing memcached as 2nd level cache later ...

How to convert PHP array into Mysql resource

I have the following scenario. I must run a query and then save it to memory, and if I need the same result again to obtain it from memory. Storing and reading from memory is made with memcache. The problem is that if you hold information in an array one at a time just have to treat two cases: 1 for resource type and one for array type....

ASP.NET Data Caching? Memcache equivalent

Having used PHP on Linux a lot, I'm used to using memcache so that the database doesnt have to be accessed on every single request. What do people use on Windows the achieve this? From the asp.net mvc applications which I've seen, none of them use any sort of cache, they just hit the database on every request? Is this common, and if so, ...

Scaling EhCache

Hi everyone, I'm currently building an application that needs to be scalable, and therefor I'm interested in distributed caching and not replicated caching. We will be using memcache for common cache use cases. However Hibernate and Spring Security ACL both rely on EhCache which doesn't seem to have the same replication scheme as memca...

Android: Best practice for keeping data in Memory and Database at same time.

We're designing an Android app that has a lot of data ("customers", "products", "orders"...), and we don't want to query sqlite every time we need some record. We wanna avoid to query database as most as we can, so we decided to keep certain data allways in memory. Our initial idea is to create 2 simple classes: "MemoryRecord": a clas...

anyone used memcached with oracle ?

Just want to know your experience of infrastructure using memcached as caching solutions with Oracle database. Oracle's caching solution, TimesTen, is very expensive in terms of licensing cost ...

is the expiration time updated in memcached after an increment?

When you put a value in memcached, you can set an expiration time. However, when you increment a value you can not (at least not from PHP) set a new expiration time. My question: Is the expiration time reset on increment to it's initial value? Or it it unchanged? Or is there another way to regenerate the expiration time? EDIT: Both t...

Rails3 and Easily caching views and controllers

Hi all, I am currently caching my web application. So I was driving to use memcache and i was looking for an easy way to handle all that. For exemple, i would like to cache all my contents until they are not modified. And I can't cache all the page because some parts need to be cached apart. So I could use a fragment_cache for the c...

How to approach caching in a web application?

Hello there, this might be a more general question, not just Rails related. I'm about to start working on an application that will need to employ some kind of caching strategy sooner or later. How to approach caching when programming a web application? Should I think it through up front or is it a matter of a later decisions? And then...

Will memcache work in this scenario?

I have an application which deals with real-time data. A lot a data is written and read simultaneously from a db e.g. something like a chat application. I understand the use of memcache but I am not sure if it would be best to use it in this scenario. If yes, then how can I use it? Note, I cannot use technologies like Comet, Websockets...

Difference between Memcache, APC, XCache and other alternatives I've not heard of....

Hi there. At work, we've recently started designing an application to me "large scale" (we're engineering for the potential to serve up many millions of hits a day). One of the senior devs and the sysadmin have set up memcache on the server. As I understand it, Memcache will hold query results and certain tables in memory for X am...

Seemingly impossible PHP variable referencing behavior when using Memcached's set method

I have a rather weird problem. Because of a certain PECL bug, I pass a var into memcached and it gets changed. The suggested workaround is to pass $data.'' instead of $data and that destroys the reference. But that won't work for me because I don't just pass strings into memcached, I pass all data types. So I ended up assigning a new v...

Configuring Memcache + CakePHP, "Cache not configured properly" error

I'm setting up cacheing for a CakePHP application and having a really hard time getting it to talk to Memcache. I've written the caching code while testing against the File based caching engine, and all the logic is solid. When I watch debug traffic, caches hit, miss, and expire properly. I wanted to switch over to Memcache because the ...

mod_fcgi + APC + Shared Memory

One of my sites is growing and I'm having scalability issues. My knowledge with this new software is rather small, my hosting company doesn't have a clue either. Shared Memory is not working since variables are not cached between requests, is there a way to make this work? At the moment the script is relying on Memcached but there is th...

Memcache::set() broken pipe

In general, Memcache is working... but my log has many occurrences of this: Memcache::set() [memcache.set]: send of 8192 bytes failed with errno=32 Broken pipe (the number of bytes changes) PHP5.3, Memcache class (v2.2.5 - the latest stable version) What is a broken pipe, why is it happening so much, and can it be improved? ...

What the php caches that suport tagging?

I need a cache system for PHP that suport tags. It's will be used caching a lot of queries results, from many users, and every time I will need to clear some user cache, or some module cache... I thinked, and conclude that tagging are the best way to do that. Like ('messages_unread_user_300','messages','user_300','unread') it easy to ...