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...
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 ...
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...
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?
...
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 ...
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....
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, ...
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...
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...
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
...
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...
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...
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...
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...
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...
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...
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 ...
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...
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?
...
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 ...