Questions tagged [memcached]

0

votes
0

answer
10

Views

memcached not storing array of complex items with specific keys

Somehow I can't store an array of complex items if i put user_ as prefix in the key my php code $this->skills = [ 'defensiv' => DefensivSkill::getAllUserSkills($this), 'offensiv' => OffensivSkill::getAllUserSkills($this), 'spezial' => SpezialSkill::getAllUserSkills($this), 'pve' => PVESkill::g...
Kapsonfire
0

votes
0

answer
4

Views

Different browsers access the same view ,generate different cacahe ,why?

my english is not well. django use redis-cache then two browser access the same view,after one.but redis have two key cache. uels.py: path("api/overview/",cache_page(60*15)(views.OverView.as_view()),name="overview") setting: CACHES = { "default": { "BACKEND": "django_redis.cache.RedisCache", "LOCAT...
weidong bai
1

votes
1

answer
420

Views

What is the time out of a memcached counter created using the increment call in memcached service?

When will the value created using the following call time out? Is the expiry renewed by subsequent calls to increment? MemcacheService cacheService; cacheService.increment(key, delta, initialValue);
Usman Ismail
1

votes
1

answer
505

Views

Cocos2d and usage of CCAnimationCache

I'd like to understand the usage of CCAnimationCache. I have a cache of enemies objects. Each object has two CCAnimations member variables, a standard animation and a special animation. The frames in the animation varies according to the type property of the enemy object. @interface EnemyEntity : E...
mm24
1

votes
1

answer
709

Views

PECL-Memcache can't read INTs set from PECL-Memcached

I'm in the process of switching applications from PHP PECL-Memcache client to PECL-Memcached and I'm hitting a snag. It seems that if I set an INT value from PECL-Memcached that PECL-Memcache can't read it. I see something like: MemcachePool::get(): Failed to unserialize data If I cast the int value...
Gary Richardson
1

votes
2

answer
131

Views

How to use extra RAM of my box on existing java app ( not exposing it to GC ) or to a third party tool I use?

These days we have lots of cheap RAM available but we cant use it as it causes huge garbage collection and halting the application which is not desirable. When I was reading Terracotta; I felt that this is solving my problem because I will use my extra memory on terracotta and that memory will not...
Deepak
1

votes
3

answer
6.3k

Views

PECL/Memcache and PECL/Memcached

I have both PECLs installed in my PHP setup, and when I do php -V I can see both running. In my /etc/php5/conf.d/ folder both of these PECLs are enabled. When I checked phpinfo, then I came to know PECL/Memcache is used as it had the assigned port number 11211. Both PECLs have their own config in ....
1

votes
2

answer
365

Views

Is there anyway to view memcache data in google app engine?

Basically what I want to do is see the raw data of memcache so that I can see how my data are being stored.
shriek
1

votes
1

answer
185

Views

How can I atomically add a new key to google appengine's memcache?

I'd like to atomically add a new key to google appengine's memcache service using the Java API. This means that the put operation should fail (e.g. throw an exception or return false ) if the key is already present in the memcache, preventing concurrent additions (which would result in overwriting)...
paul
1

votes
3

answer
232

Views

Memcached for IN-MEMORY storage

Does memcached guarantee persistent IN-MEMORY storage of objects for as long as it is running and the available configured memory space enough ? An example is storage of session data for messaging systems. Under what circumstances will i try to read a key from memcached ( which i wrote in earlier, w...
Muzaaya Joshua
1

votes
1

answer
206

Views

get failed keys or their count from php memcached setMulti function

I try to set about a thousand keys inside memcached using setMulti function of PHP memcached lib. Now if one or more of the keys fail to set, then I want to know which of them failed or at least get count of failed keys. In documentation however, it is given that setMulti returns only true or false...
Shades88
1

votes
1

answer
2.6k

Views

Clarification / Examples on ServiceStack Authentication

I'm trying to get to grips with ServiceStack to build a new mobile product with it. It's slowly coming together but the documentation, although good, is a little brief in parts with no facility for comments & questions. This question is about the built-in authentication. I have been working from th...
Jordan
1

votes
1

answer
194

Views

How can I use Memcached to store data for a given time

I am wondering how I would use Cache (MemCache) to display how many registered and active users I have on my website. I currently use: return mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `active` = 1"), 0); And this isn't good to use because on each page load, it's going...
Harrison Howard
1

votes
2

answer
817

Views

Explain how to use memory caches in Python

I have the following recursive solution for the nth fibonacci number: def fib(n): if n == 0: return 0 elif n == 1: return 1 else: return fib(n-1) + fib(n-2) x=input('which fibonnaci do you want?') print fib(x) I need to change this, so that it uses a stored memory cache and gets stuff out of that to...
user2095044
1

votes
1

answer
224

Views

Memcache key generation from the query

I am caching the select query and the values inside the memcache. I am only using simple single table queries. I tired using the query itself as a key , But really couldn't because of the special character and various other reasons. Is there anyway to generate a key out of the query to a unique ke...
Rabin
1

votes
3

answer
956

Views

MySQL to refresh memcached

We have a web application running on LAMP stack, the application depends on various services. These services gets data from cache (memcached) which is being refreshed using cron (from MySQL). Cron processes are running every 5 mins. In this approach we can not serve data which is updated recently a...
Pawan
1

votes
2

answer
84

Views

Which threading model can I choose?

I am writing a system something similar to a key-value store, but differently, the get and set operation is frequently called. In server end, I use the 'one thread per client' threading model just now. But in this application, the connections from client end of every task is about ten thousands, so...
xunzhang
1

votes
3

answer
1.9k

Views

Python memcache consistent hashing using ketama

I have a code which add extra memcache instance at run time, but this makes my keys lost. I know there are several libraries available like consistent_hash, hash_ring but I am unable to use them in my code. I know there is ketama available but couldn't find python code sample for it. import random i...
user1551373
1

votes
1

answer
144

Views

Caches Dissapear from elasticache (memcached)

I set something to memcached with $M->set('thingtobeset', $resultsforcache, 60*60*24*7*6); It should keep there for 42 days, unfortunately it seems to be unset in under 10 minutes. Any ideas why this could be happening?
Jay
1

votes
1

answer
2.8k

Views

Memcached on xampp

Read many topics about Memcache and Memcached PHP extensions, Find related PECL packages of Memcached here, but unfortunately I can't compile it (v2.0.1 with PHP 5.4.7) right now. So I downloaded compiled version from moojiuce PHP-5.4.8_memcache-2.2.7_x86_vc9.zip a dll file which xampp doesn't disp...
revo
1

votes
3

answer
2.6k

Views

Memcached is installed on PHP 5.3.28 on MAMP 3.0.3, but not working

I have a Drupal site running on fresh MAMP PRO 3.0.3 install with the PHP version 5.3.28 on OS X Mavericks 10.9.2. I installed memcache with pecl install memcache and added the extension=memcache.so line in php.iniunder the extensions section, but still Drupal shows multiple You must enable the PECL...
Aaaron
1

votes
5

answer
178

Views

I developed a site in Zend framework 1.11.My app is very slow.How to increase speed?

I had developed a site in Zend Framework 1.11(Mysql Database).It is very slow.My application works on social media posts like hootsuite. But it is very slow.How to improve it. My database is very large(In testing only).My site is not launched.Please help me to improve performance.
Vamsi Krishna
1

votes
1

answer
5.1k

Views

Installation of memcached - unable to find libevent

To install memcached I run: ./configure from memcached server location but I receive error: checking for libevent directory... configure: error: libevent is required. You can get it from http://www.monkey.org/~provos/libevent/ If it's already installed, specify its path using --with-libevent=/dir/...
blue-sky
1

votes
1

answer
377

Views

CouchBase Client vs Spymemcache, Client Usage

I am to use CouchBase as my caching layer. My caches are serialized objects and not(always) Document type or JSON values. The couchbase client(Couchbase-Java-Client-1.4.3) also uses Spymemcache jars which is the client of memcached server. My questions are, Should I use only Couchbas Client to cac...
Débora
1

votes
1

answer
1.4k

Views

Disable cache digests in Rails 4

I'm in the process of migrating a Rails 3 app to Rails 4. The migration was mostly fairly smooth, but one big problem I'm encountering is that my old Rails 3 code to expire my caches isn't working. I'm getting logs like: Expire fragment views/localhost:3000/cardsets/36?action_suffix=edityes (0.0ms)...
AlexC
1

votes
3

answer
572

Views

Java: use concurrent hashmap or memcached cache

I have a simple country states hashmap, which is a simple static final unmodifiable concurrent hashmap. Now we have implemented memcached cache in our application. My question is, Is it beneficial to get the values from cache instead of such a simple map? What benefits I will get or not get if I mov...
mightymahesh
1

votes
2

answer
1k

Views

magento how to change session handler to memcached?

I am a newbie at Magento and my server's default php session handler is memcached. I just installed Magento (version 2) and I keep getting error: open(localhost:11211/sess_qmnpedun2j0ie0jed9g8r08pd0, O_RDWR) failed: No such file or directory It is trying to use File Handler for Memcached sessions. H...
Gasim
1

votes
2

answer
413

Views

How to implement a caching server?

I have a scenario today where about 50,000 windows clients (users) continuously poll a standalone server regularly throughout the day. For security reasons I am not mentioning what the server is doing, but it is a third part vender product with in-premise installation. So I as a programmer don't hav...
Vignesh.N
1

votes
1

answer
783

Views

How to do memcached sessions with django 1.8

In my django 1.6 app I did the following to get cached sessions and I'm curious if any of this has changed for django 1.8. The goal here is 100% in memory sessions so a restart will wipe the slate clean / that each web request will require 1 less database query / that it could scale many frontend ma...
Toran Billups
1

votes
1

answer
112

Views

Flattening Dynamodb write bursts

I'm looking for a creative and most efficient way to flatten write bursts to dynamodb. I have 4 cron jobs that run every 3 minutes .each on its own thread. due to reason I can't control they start at the same time. Part of the jobs is to write a few 1000s of rows to dynamodb. This takes normally 10...
Nir
1

votes
2

answer
458

Views

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 all thousands of record in DB? How this synchronisat...
Swapnil Kotwal
2

votes
2

answer
266

Views

using memcached for very small data, good idea?

I have a very small amount of data (~200 bytes) that I retrieve from the database very often. The write rate is insignificant. I would like to get away from all the unnecessary database calls to fetch this almost static data. Is memcached a good use for this? Something else? If it's of any relevance...
marshallpenguin
2

votes
1

answer
1.4k

Views

memcached and miss ratio

Drupal 6.15 and memcache running on RHEL 5.4 server. Memcache miss percentage is 32%. I think is is high. What can be done to improve it?
2

votes
1

answer
349

Views

need help with intermediate/advanced caching in django, with memcached and friends

So: I always deploy my Django apps with memcached running alongside. For my purposes, they're always running on the same instance. I'm enabling the cache with these lines in settings.py: CACHE_BACKEND = 'memcached://127.0.0.1:11211/' CACHE_MIDDLEWARE_SECONDS = 60 CACHE_MIDDLEWARE_KEY_PREFIX = "the_n...
fish2000
2

votes
1

answer
1.7k

Views

Shoud I close every connection to Memcache after getting value?

I use Memcache on my server to store some useful query results. And I have a problem with performance of my server. I started investigating it and it's some kind of lock issue. My first guess is that is Memcache. I use it in this way: $memcacheRT = new Memcache; if (not open) $memcacheRT->connect(...
Tomasz Smykowski
2

votes
1

answer
2.1k

Views

Rails.cache and un-dumpable (Marshal) structures: how to cache? (on the example flickraw-response)

i want to Rails.cache a flickraw response (this is applicable to other un-dumpable structures as well) with memcached as follows: @flickr = Rails.cache.fetch('flickr_sets', :expires_in => 1) { flickr.photos.getRecent } the obvious error is TypeError: singleton can't be dumped i read a good post on t...
z3cko
2

votes
1

answer
677

Views

How to store a value in memcached store from a rails worker

In my rails app, i want to store a value from the worker into the memcached and read it from the application controller. But in the worker i couldn't store the value as below cache_store.write('db_status','down') it says, undefined local variable or method cache_store. How do i configure my worker t...
anusuya
2

votes
2

answer
1k

Views

Has anyone gotten a ruby memcached client working on Windows?

Google'd around. Getting stuck on installing libmemcached. UPDATE: This is the new error log for Ruby 1.9.3 checking for pthread-config... no configure: error: could not find libpthread *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/...
Phenglei Kai
3

votes
1

answer
2.9k

Views

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 (the file could be a text file/csv/xlsx etc), i get t...
jetpackdata.com
9

votes
1

answer
469

Views

Storing million key-value in memcached — good or bad idea?

I am considering using memcached in conjunction with my PHP app to store 5 millions key-value pairs. My objective is to avoid back and forth from DB (which in my case is the filesystem). I may have 100-500 accesses per seconds to the key-values. The Key-values are both MD5's and are in the form: arr...
JoeSlav

View additional questions