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
16
votes
2 answers

Should we use php5-memcache or php5-memcached when connect with memcached server?

In php, there are 2 modules that can be used when programming with memcached. Memcache and Memcached In the document, it said that php5-memcached using libmemcached to connect memcached. And there are more function available in php5-memcached…
Leon
  • 2,810
  • 5
  • 21
  • 32
16
votes
4 answers

How would Redis get to know if it has to return cached data or fresh data from DB

Say, I'm Fechting thousands or record using some long runing task from DB and caching it using Redis. Next day somebody have changed few records in DB. Next time how redis would know that it has to return cached data or again have to revisit that…
Swapnil Kotwal
  • 5,418
  • 6
  • 48
  • 92
16
votes
3 answers

how to keep caching up to date

when memecached or Redis is used for data-storage caching. How is the cache being updated when the value changed? For, example. If I read key1 from cache the first time and it missed, then I pull value1 and put key1=value1 into cache. After that if…
user1947415
  • 933
  • 4
  • 14
  • 31
16
votes
1 answer

HOW TO: Install Memcache on XAMPP (Windows 7/8/10)

I am doing a project on Laravel. I'm trying to make a simple system that uses cache focused on memcache. When I started studying, I checked Laravel site first and then I found that using the Memcached cache requires the Memcached PECL package to be…
Shweta
  • 1,212
  • 4
  • 20
  • 36
16
votes
3 answers

Is memcache suitable for passing user details from Apache to Node.js

we have our old website built on LAMP stack with user authentication. Now we have built a new social platform for the same users with live chat features, video and discussion forums etc and we have used node.js for this purpose. When a user is…
Gublooo
  • 2,550
  • 8
  • 54
  • 91
16
votes
2 answers

Cache layer for MVC - Model or controller?

I am having some second thoughts about where to implement the caching part. Where is the most appropriate place to implement it, you think? Inside every model, or in the controller? Approach 1 (psuedo-code): // mycontroller.php MyController…
Industrial
  • 41,400
  • 69
  • 194
  • 289
16
votes
3 answers

What is the best way to do AppEngine Model Memcaching?

Currently my application caches models in memcache like this: memcache.set("somekey", aModel) But Nicks' post at http://blog.notdot.net/2009/9/Efficient-model-memcaching suggests that first converting it to protobuffers is a lot more efficient.…
Koen Bok
  • 3,234
  • 3
  • 29
  • 42
16
votes
3 answers

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…
JasonDavis
  • 48,204
  • 100
  • 318
  • 537
16
votes
1 answer

What's the difference between SAP HANA and Memcached, Redis and existing databases hacked to use memory instead of disk?

There's a huge buzz in the business analytics world about the In-Memory database HANA by SAP. I'm struggling to see its real innovation compared to current open source databases. OK, it has indexing, graph support, column storage, etc... but that's…
ksiomelo
  • 1,878
  • 1
  • 33
  • 38
16
votes
5 answers

'Memcache' not found in command line PHP script

I have Memcache installed and working for PHP apps run through Apache (v2.2) but when I try to run a .php file in the command-line i get this error: Fatal error: Class 'Memcache' not found in /usr/local/Matters/app/matters-common/connection.php on…
Richard Stelling
  • 25,607
  • 27
  • 108
  • 188
16
votes
2 answers

How do you count cardinality of very large datasets efficiently in Python?

I have been playing at work with some very very large sets of data, typically several billions of elements, that are all maintained in a memcached cloud and periodically dumped into files, and for one of my tasks I'm trying to count the cardinality…
Charles Menguy
  • 40,830
  • 17
  • 95
  • 117
15
votes
3 answers

Is Memcache (Java) for Google App Engine a global cache?

I'm new to Google App Engine, and I've spent the last few days building an app using GAE's Memcache to store data. Based on my initial findings, it appears as though GAE's Memcache is NOT global? Let me explain further. I'm aware that different…
Jerry Hardaway
  • 267
  • 3
  • 11
15
votes
2 answers

Memcache Consistent Hashing, Cluster, PHP code, Ketama and all about it

I have been trying for the whole day to understand and code for Memcache with PHP but I am getting confused at few points. I have gone through many articles and almost every SO questions related this but could not find exact answers. 1) What would…
user2925077
15
votes
5 answers

Cache a django view that has URL parameters

I have recently implemented Django's excellent cache framework. However from what I understand Django will not cache a view that is passed parameters in a get request. I have an Ajax view that is passed get parameters that I would like to cache for…
Tristan Brotherton
  • 2,533
  • 7
  • 32
  • 38
15
votes
3 answers

MemCache vs Azure Caching

I am torn between using Memcache and using Windows Azure Caching. I have no experience in either of them so I would love for someone to come up with some deciding factors: price performance ease of use anything
MaxWillmott
  • 2,170
  • 2
  • 23
  • 34