Все вопросы: [memcached]

211 вопросов

14
голосов
5ответов
29424 просмотров

Memcache won't flush or clear memory

I've been trying to clear my memcache as I'm noticing the storage taking up almost 30% of server memory when using ps -aux. So I ran the following php code. $memcache = new Memcache; $memcache->connect("localhost",11211); $memcache->flush(); print_r($memcache->getStats()...

1
голосов
2ответов
1027 просмотров

Why doesn't memcache work in my Django?

from django.core.cache import cache def testcache(): cache.set('test','I am putting this message in',3333) print cache.get('test') It just prints "None" This is in "ps aux": dovr 2241 0.0 0.8 57824 2144 ? Ssl 04:20 0:00 memcached -d -u root -m 3900 -p 11...

1
голосов
1ответов
164 просмотров

Is this the correct way to install memcache for Python?

Install Memcached Install python-memcache library Start Memcache service Is that right? What else is there?

0
голосов
2ответов
115 просмотров

cache_money only writing to memcached on creates and updates, and seemingly never looking in the cache for index/show actions

I seem to be having some extremely odd cache_money interactions. When I am on the console, and I create a new instance of a class and save it I see the cache misses and cache stores on my memcached console output. Then when the create finishes I see a bunch of cache deletions. If I then try to...

14
голосов
5ответов
3410 просмотров

Users take sessions of other users when sessions are stored in memcached (Rails)

I have a very weird problem, when storing my session in Memcached. From time to time some users takes the session of others. E.g. John, becomes logged in as Maria, Maria as Chris and so on. I use Rails 2.3.4, but the same problem has been happening with earlier versions of Rails. I use only one ...

1
голосов
2ответов
462 просмотров

How do I disable cache_money caching for certain ActiveRecord models

I tried doing the def index(*args); end; trick within the models I'd like cache_money to ignore, but to no avail.

21
голосов
6ответов
48863 просмотров

php_memcache.dll for PHP 5.3

I recently setup a server using the latest version of XAMPP for Windows. With it came PHP 5.3. I'm now looking for a memcache.dll file that works with PHP 5.3 I've used some of the previous .dll files and recieved an error message: "PHP Startup: memcache: Unable t initialize module. Module com...

2
голосов
4ответов
1560 просмотров

How to increase PHP over HTML speed?

I have a PHP file that gets HTML from Memcached and serves it to the user. When I test it like this: ab -n 1000 -c 100 http://website.com/test.php It does 22 requests per second. But when I put the same HTML to an HTML file and do this test: ab -n 1000 -c 100 http://website.com/test.h...

3
голосов
4ответов
1171 просмотров

How to improve PHP performance?

I've created PHP application for Facebook. It uses MySQL, Memcached and works on Lighttpd on Centos 2,6 Ghz and 2 GB RAM. it's basically one PHP file that after first run is cached and every next time it's served in 0,8 ms directly from Memcached. What more can I do to shorten this time?

0
голосов
1ответов
93 просмотров

Querying Memchached

First, a little background: I am using ATrack, an free google app-engine based torrent tracker, and I need some help integrating with it. I have pasted the (or what i can tell might be) relevant code here as i think its a little too long to put in this post. If you read carefully you'll see it...

0
голосов
2ответов
1973 просмотров

json_encode and nested objects

I have nested PHP objects that I would like to save in memcache. Can I use json_encode(), json_decode() to store/retrieve the data from memcache? Implicit in the question is whether the json_encode() function is "clever" enough to introspect my objects without me having to explicitly define the ...

3
голосов
3ответов
2209 просмотров

How can caches_action be configured to work for multiple formats?

I have a rails action which responds to requests in various formats including AJAX requests, for example: def index # do stuff respond_to do |format| format.html do # index.html.erb end format.js do render :update do |page| page.replace_html...

0
голосов
2ответов
1200 просмотров

how to access memcache item created in php from java

item is json serialized not binary so it is readable. I am getting problem while trying to get the item, with php the key is working fine but when i access the item using same key in java it fails I have only one server so server hashing should not be aproblem I have done a wireshark analysis an...

0
голосов
2ответов
5385 просмотров

Are these memcached stats normal?

Are these stats normal? I have problems with my PHP products, so I want to know if these data are healthy stats STAT pid 2312 STAT uptime 5292037 STAT time 1253692925 STAT version 1.2.8 STAT pointer_size 64 STAT rusage_user 2600.605647 STAT rusage_system 9533.168738 STAT curr_items 1153303 STAT ...

2
голосов
3ответов
492 просмотров

What's quicker: serving a static HTML file from the filesystem or from MemCache?

What's quicker: serving a static HTML file from the filesystem or from MemCache? Also, is there scaling and/or other concerns I should be aware of?

8
голосов
2ответов
2612 просмотров

where can I find php_memcached.dll php extension?

Spent a lot of time and I cant find a built version anywhere. please help. Note: please don't turn me to php_memcache.dll. I have this one. I'm looking for php_memcached.dll.

2
голосов
2ответов
1421 просмотров

How do i fix my S3/memcache latency problem?

We have SERIOUS latency issues SOMETIMES on our server. We store 3 things of interest in S3 and stuff them into memcache as well. User avatars averaging ~25k text ~1.5k xml ~1.5k we have dedicated 128meg of ram for memcached as of right now... as of right now it is riding 74 meg of it doing...

0
голосов
1ответов
518 просмотров

Faulty to use memcache together with a php web-browser-game in this way?

Background We are currently working on a strategy web-browser game based on php, html and javascript. The plan is to have 10,000+ users playing within the same world. Currently we are using memcached to: store json static data, language files store changeable serialized php class objects (su...

322
голосов
4ответов
141568 просмотров

When should I use Memcache instead of Memcached?

It seems that PHP has two memcached libraries named memcache and memcached. What is the difference and how do you know which one to use? Is one outdated? It seems that memcached offers more methods so I would assume that means it has had the most development - but it also seems to require externa...

0
голосов
2ответов
1184 просмотров

is it time to move from memcache to memcached

In 2009-07-07 was released the first stable of memcached, the php library based on libmemcached. Now you have two options (in php) memcache or memcached. memcache is the usual one, but memcached promise many improvements over the other one: one of my favorites are fact of use libketama for keys...

0
голосов
4ответов
2048 просмотров

Replace PHP Sessions

I have a social network type app I have been working on for at least 2 years now, I need it to scale well so I have put a lot of effort into perfecting the code of this app. I use sessions very often to cache database results for a user when a user logs into the site I cache there userID number,...

1
голосов
2ответов
1351 просмотров

scaling up using memcached to store gzipped file

I have a web service that serves a javascript source file to browsers. The javascript file is compiled by php in real time with some file includes. The resulting file changes only a few times a day. It is gzipped by apache before being served to browsers. I'd like to use memcached to serve it fr...

30
голосов
7ответов
55221 просмотров

Maximum size of object that can be saved in memcached with memcache.py

I need to return a rather big file (11MB) to the user. For certain reasons, I can't just provide a direct url to the file (http://www.sample.com/mybigfile.exe); instead it must be accessed through code. Instead of having to read it from disk over and over, I thought of saving it in memcached (if...

5
голосов
2ответов
926 просмотров

memcacheD This is ok?

I'm new to memcached. Is this code vulnerable to the expired cache race condition? How would you improve it? $memcache = new Memcache; $memcache->connect('127.0.0.1'); $arts = ($memcache===FALSE) ? FALSE : $memcache->get($qparams); if($arts===FALSE) { $arts=fetchdb($q, $qparams); $...

4
голосов
2ответов
4361 просмотров

How to synchronize access to ehcache, memcached & other key-value stores?

From my understanding, each of these methods: get() and put() are atomic. But, when accessing caches like ehcache & memcached, in a CheckThenAct fashion, race conditions will arise. What should we synchronize on to ensure that if thread1 does a Get() and thread2 does a Get() followed by a P...

4
голосов
2ответов
2293 просмотров

Replacing an item in memcached without changing the expiration time

I have several items on memcached that should expire 24h after the creation time. I need to update those items, while keeping the expiration time unchanged. How can I do this? Apparently the replace function requires an expiration parameter.

1
голосов
2ответов
754 просмотров

simpledb, sql azure, mysql + memcached

For a new scalable high traffic global ecommerce website (asp.net) project which technology fits best (max. scalability & performance, min. price & maintenance)? amazon simpledb, microsoft sql azure, mysql + memcached combo, or your solution...

0
голосов
3ответов
604 просмотров

Using Memcache for storing connection objects

Is it advisable to store SQL Connection objects in memcache?

4
голосов
2ответов
1107 просмотров

memcached or lucene.net with nhibernate

Does anyone have used memcached as a level2 cache or lucene.net for searching with nhibernate ? Can you please share your advances on nhibernate caching & indexing/searching. And, is memcached (with enyim cilent on the same machine by appserver) the fastest l2cache solution with nhibernate ?...

45
голосов
7ответов
75236 просмотров

Memcache maximum key expiration time

What's memcached's maximum key expiration time? If I don't provide an expiration time and the cache gets full, what happens?