Questions tagged [memcached]

Memcached is a simple distributed object cache that caches information in memory, and can be used to improve the performance of dynamic web applications by reducing access time and database load.

Memcached is open source easily deployable in-memory distributed cache, cross application and cross Platform Engine meaning the same server(s) can be accessed from a variety of languages - PHP, Java, and .NET and from Windows, Linux, etc. Memcached is currently distributed under a BSD-style open source license.

5184 questions
25
votes
1 answer

How to clear the entire second level cache in NHibernate

I wish to clear the entire second level cache in NHibernate via code. Is there a way to do this which is independent of the cache provider being used? (we have customers using both memcache and syscache within the same application). We wish to…
Bittercoder
  • 11,753
  • 10
  • 58
  • 76
25
votes
4 answers

How can I have Google App Engine clear memcache every time a site is deployed?

The title asks it all. The content on the site I'm building wont change very quickly at all and so Memcache could potentially store data for months except for when I put up an update. Is there a way to make it clear the cache every time I deploy the…
donut
  • 9,427
  • 5
  • 36
  • 53
24
votes
6 answers

When to use a key-value store for web development?

When would someone use a key-value (Redis, memcache, etc) store for web development? An actual use case would be most helpful. My confusion is that a simple database seems so much more functional because, to my understanding, it can do everything a…
Jacjoi
  • 345
  • 1
  • 3
  • 7
24
votes
4 answers

Is it possible to get/search Memcached keys by a prefix?

I'm writing to memcached a lot of key/value -> PREFIX_KEY1, PREFIX_KEY2, PREFIX_KEY3 I need to get all the keys that starts with PREFIX_ Is it possible?
Zanoni
  • 30,028
  • 13
  • 53
  • 73
24
votes
2 answers

Memcache stats understanding

Memcache telnet interface has command called STATS, it shows a lot of numbers, where can I read what does it mean ? how to analyze them ? how much cache usage is effective etc ...
user1016265
  • 2,307
  • 3
  • 32
  • 49
24
votes
1 answer

Dalli vs Redis-Store for Rails App

I have been using Dalli until now for caching and today I came across Redis -Store. I am wondering should I switch to redisstore. My app already uses redis for certain stuff so I have a redis server which is quite big(in terms of resources) and I…
Josnidhin
  • 12,469
  • 9
  • 42
  • 61
24
votes
4 answers

Manually Clear Fragment Cache in Rails

I'm using Memcached with Heroku for a Rails 3.1 app. I had a bug and the wrong things are showing - the parameters were incorrect for the cache. I had this: <% cache("foo_header_cache_#{@user.id}") do %> I removed the fragment caching and…
yellowreign
  • 3,528
  • 8
  • 43
  • 80
23
votes
2 answers

Memcached eviction prior to key expiry?

Can a key/value pair stored in memcached get evicted prior to its expiry if there is still free space available? I have a memcached process running that is allowed to consume up to 6GB; 2.5GB are reported in use and that number fluctuates only…
esilver
  • 27,713
  • 23
  • 122
  • 168
23
votes
6 answers

Memcached best practices - small objects and lots of keys or big objects and few keys?

I use memcached to store the integer result of a complex calculation. I've got hundreds of integer objects that I could cache! Should I cache them under a single key in a more complex object or should I use hundreds of different keys for the…
jb.
  • 9,987
  • 12
  • 39
  • 38
23
votes
1 answer

what is the max key length and max size of value in memcached?

I am using the memcached latest , may i know what is the max key length ,and max size of the value we can store in the memcached ? How to integrate the memcached with spring , any idea please .
Bravo
  • 8,589
  • 14
  • 48
  • 85
23
votes
12 answers

Check if a key exists in Memcache

How do I check in PHP if a value is stored in Memcache without fetching it? I don't like fetching it because the values I have set are all 1MB in size and after I fetch it, I have no use for it, so I'm wasting resources. I'm using this in a script…
Matic
  • 261
  • 1
  • 2
  • 6
23
votes
3 answers

Memcached vs SQL Server cache

I've been reading a lot of articles that suggest putting a Memcached (or Velocity, etc) in front of a database is more efficient than hitting the database directly. It will reduce the number of hits on the database by looking up the data in a…
Mike Therien
  • 928
  • 3
  • 10
  • 25
23
votes
6 answers

Rails + Dalli memcache gem: DalliError: No server available

Hi I'm having trouble setting up my Rails project on my server because apache keeps complaining DalliError: No server available. I installed memcached on my ubuntu machine, but it still doesn't work. My rails project also has config.cache_store =…
bigpotato
  • 26,262
  • 56
  • 178
  • 334
23
votes
3 answers

In Django, how to clear all the memcached keys and values?

I don't want to restart the memcached server!
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
23
votes
5 answers

Django Caching for Authenticated Users Only

Question In Django, how can create a single cached version of a page (same for all users) that's only visible to authenticated users? Setup The pages I wish to cache are only available to authenticated users (they use @login_required on the view).…
Jeff
  • 3,879
  • 3
  • 26
  • 28