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

Transfer data from one memcached server to another

Currently we are storing our user sessions in memcached, our web apps are running with PHP 5.3.6 and Apache 2.2.3. We will be replacing our memcached server, I am wondering if there is a way we can transfer the data from one memcached server to…
forestclown
  • 1,582
  • 4
  • 25
  • 39
12
votes
4 answers

Can I install the memcached PHP extension with PECL?

I'm having trouble installing the "memcached" PHP extension from PECL, though I can successfully installed the "memcache" extension. (They are separate PHP extensions.) For example, these commands work okay: $ sudo pecl install memcache $ sudo…
richardkmiller
  • 2,902
  • 3
  • 31
  • 29
12
votes
3 answers

fatal error: libmemcached/memcached.h: no such file or directory

I try to setup a development environment for developing on django itself. Docs: Contributing / Running the test suite for the first time python -m pip install -r requirements/py3.txt It fails: ... x86_64-linux-gnu-gcc -pthread -Wno-unused-result…
guettli
  • 25,042
  • 81
  • 346
  • 663
12
votes
4 answers

Memcache sharing

Is it possible to share a single instance of a Memcache between multiple projects. Suppose I push one object inside the memcache in one project, is it possible for me to retrieve the same object from a different project. ?
Undefined
12
votes
3 answers

When to use memcached

I sorta get how memcached works. You use it store chunks of data to improve site performance. When you want to retrieve some data you check if its in memcached first, if it is, then you retrieve it, otherwise you check your database/filesystem…
john mossel
  • 2,158
  • 5
  • 24
  • 39
12
votes
1 answer

How to use memcache with php

I am new to this memcache stuff. I read that it saves lot of time of page load time by caching the database key. I have my php application and I want to use memcache as it takes too much time for my application to retrieve the whole set of results…
R.Raj Prashanth
  • 121
  • 1
  • 1
  • 3
12
votes
2 answers

Multiple memcached servers question

hypothetically - if I have multiple memcached servers like this: //PHP $MEMCACHE_SERVERS = array( "10.1.1.1", //web1 "10.1.1.2", //web2 "10.1.1.3", //web3 ); $memcache = new Memcache(); foreach($MEMCACHE_SERVERS as $server){ …
Stann
  • 13,518
  • 19
  • 65
  • 73
12
votes
3 answers

How can I install the php memcached extension on Docker's PHP7 Alpine image?

The official php7 docker image has the following example: FROM php:7.0-fpm RUN apt-get update && apt-get install -y libmemcached-dev \ && pecl install memcached \ && docker-php-ext-enable memcached I'm trying to use FROM…
timetofly
  • 2,957
  • 6
  • 36
  • 76
12
votes
4 answers

How can I store data in RAM memory using PHP?

Is there a way to store small data in RAM memory using PHP so that I can have access to the data between different session instead of regenerating it. Something similar to memcached (I don't have access to memcahced). My current solution is just to…
Andry R.
  • 199
  • 1
  • 2
  • 5
12
votes
7 answers

Using memcache as a session store?

I currently have a huge problem. Two days ago my site running on one server was too much, so I purchased two more and had them clustered (rsync and load balanced). I then start noticing that a user would hit server-1 and then on the next request hit…
William
  • 1,033
  • 2
  • 13
  • 25
12
votes
5 answers

PHP memcache design patterns

We use memcache basically as an after thought to just cache query results. Invalidation is a nightmare due to the way it was implemented. We since learned some techniques with memcache thru reading the mailing list, for example the trick to allow…
pielle
12
votes
1 answer

AWS Elasticache - increase memcached item size limit

Im using the memcached module on AWS Elasticache in my python Flask app (with Flask-Cache) When i try to set a file that is less than 1MB i need to repeatedly access to the cache, i have no issues. But when the file size increases more than a MB…
12
votes
4 answers

Laravel cache get all items with tag

In Laravel you can place items in the Cache with a tag like: Cache::tags('bans')->put($result->ip, $result->reason); But I can't seem to find a way to get all items with a certain tag. Is it possible to retrieve all items with a certain tag? Like:…
Matthijn
  • 3,126
  • 9
  • 46
  • 69
12
votes
7 answers

error when installing pecl memcached

I've been having real trouble installing the pecl memcached package. Have not had any joy with any yum or pear/pecl install commands I referred to this question Install PECL Memcached Error and started trying to configure/make manually I'm using…
joevallender
  • 4,293
  • 3
  • 27
  • 35
12
votes
3 answers

How to effectively implement sessions in GAE?

I was wondering about implementing my own sessions (more for an exercise than anything else) for a GAE app I'm working ... at first I was thinking of using the datastore to store the session data. However, every time something needs to be added to…
fuentesjr
  • 50,920
  • 27
  • 77
  • 81