Questions tagged [memcached]
The memcached tag has no summary.
14 questions
1
vote
0
answers
240
views
Architect Java Hashmap Hierarchy to its equivalent in Redis Cache?
I have the following Job class representing runs of a job. I have a list of start and end times in Job class because the same Job can be rerun.
public class Job {
private final List<...
9
votes
2
answers
8k
views
How would you design a “multithreaded” LRU cache using C++ (unordered_map and Linkedlist)?
Please note that this is about a thread-safe LRU cache (not simply a LRU cache as specified in https://leetcode.com/problems/lru-cache/description/). It isn't a duplicate of LRU cache design question ...
2
votes
1
answer
1k
views
Is there a way to group keys when using Memcached?
I use Memcache to store content lists with very key combinations, when user edited the content, I must refresh the cache, but it is hard to say what particular list to refresh, it is not either a good ...
0
votes
1
answer
909
views
store single big object in memcached vs multiple keys
I have following large object (20KB) cached in memcache -
Product :
{
BasicInfo, //~5KB
SellerId, //int
CityId, //int
AdditionalInfo //~15KB
}
This is being accessed at multiple ...
7
votes
2
answers
2k
views
Possibility of stale data in cache-aside pattern
Just to re-cape cache-aside pattern it defines following steps when fetching and updating data.
Fetching Item
Return the item from cache if found in it.
If not found in cache, read from data store.
...
1
vote
1
answer
513
views
Memcache queries run on a cron job?
I have several queries that leverage storing data in memcached. Does it makes and is it against best practices to run a cron job to run these queries say every 15 minutes to keep the cache updated? ...
0
votes
1
answer
1k
views
design for buffering or queuing data streams to replace database
We have a system (ms stack, .net, sql) that receives data from thousands of remote devices (several independent readings/min). We currently save all the data to a db as it arrives and a second service ...
3
votes
4
answers
586
views
Architecture change from using disk to RAM to read and write key/value pairs coming over a network
A WebApp writes a stream of data coming over a network to disk as key/value pair and then reads & send it over network again after few milliseconds in 99% of case. In 1% of cases write/read can be ...
14
votes
2
answers
2k
views
Shared Cache - Invalidation Best Practice
I'd like to know what would be a better approach to invalidate/update cache objects.
Prerequisites
Having remote memcached server (serving as cache for multiple applications)
All servers are hosted ...
0
votes
2
answers
4k
views
Basic memcached question
I have been reading up on distributed hashing. I learnt that consistent hashing is used for distributing the keys among cache machines. I also learnt that, a key is duplicated on mutiple caches to ...
0
votes
3
answers
549
views
Solutions for "Maintenance Mode"
Given a web application running across 10+ servers, what techniques have you put in place for doing things like altering the state of your website so that you can implement certain features.
For ...
7
votes
1
answer
5k
views
Atomic Memcache Operations in PHP
This post is a follow up to this question: PHP Atomic Memcache on StackOverflow.
Considering I am using Memcache (no d at the end) on PHP 5.3.10, I implemented a custom locking system where a client ...
10
votes
2
answers
2k
views
How does key-based caching work?
I recently read an article on the 37Signals blog and I'm left wondering how it is that they get the cache key.
It's all well and good having a cache key that includes the object's timestamp (this ...
15
votes
2
answers
13k
views
Using Memcached: is it good practice to update the cache when updating the database?
This question is about best practices in architecture.
Our Current Architecture
I have a PHP class that accesses MySQL for user info. Let's call it User. User is accessed many times, so we have ...