Questions tagged [caching]

Questions regarding cache algorithms by applications and implementations of information caching by database engines and other information repository and presentation applications.

28 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
0answers
2k views

Caching Strategy: WCF Buffer pooling and size

I am currently trying to understand the best configuration for caching. I am using Azure In-Role caching (currently Colocated, but Dedicated at a later point) in a Web Api 2 application in .NET 4.5.1....
4
votes
3answers
3k views

Is caching Access Tokens on the back end of a Web Application a good idea? (access_token storage best practices)

Let's suppose we have a Web Application that uses an Open Id Connect service provider, the Web Application uses the Authorization Code flow to get access to a different API, and therefore gets an ...
4
votes
1answer
312 views

Caching data in a Rails variable instead of querying the database?

I have a list of about 15000 items in my database, every one of them has a unique ID and name. New items are added regularly but usually not more than ten a day. My frontend uses a form with ...
3
votes
0answers
657 views

Creating a generic Cache solution for function calls using SOLID principles in C#

I would like to have a caching solution for a variety of function calls. All of the function calls fit the following signature public ResponseType ProcessRequest(RequestType request); About half ...
3
votes
0answers
58 views

Cache updates after not related REST request completes

I am wondering about the following scenario - it's in the land of Spring/AOP and Ehcache. Happens in REST Web Application - REST/Service/DAO layers - I have objects in cache (@Repository + @Cacheable)....
2
votes
1answer
379 views

How to perform consistent hashing on any Python object that works with hash()?

I have a Python library that performs a kind of calculation given a parameter-object. A requirement of the parameter object is that it be both hashable and serializable. It's a long calculation, so it ...
1
vote
0answers
42 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<...
1
vote
0answers
47 views

How to specify constant data wrt cache coherence?

I am suspecting cache latency issues due to constant data (or same data across multiprocessor caches) being churned up in the cache coherence protocols. Is there a way to specify specific data as ...
1
vote
0answers
174 views

Location specific caching for read-heavy data (server architecture)

This project will serve many duplicate requests with location-specific answers. I.e. 10,000 people in New York will all get the same server response (a list of businesses in New York), but one person ...
1
vote
0answers
141 views

Difference between application cache and object cache

I'm reading Martin L. Abbott, Michael T. Fisher's Scalability rules: 50 principles for scaling Web sites, and in rules 24 and 25 they talk about Application Caches and Object Caches respectively. My ...
1
vote
0answers
212 views

Saving and retrieving multiple cached json/txt data files

I am working on some numerical programming and need to generate the results for a model given a variety of input parameters. Since the model takes a while to run, I was planning to save the data to ...
1
vote
0answers
423 views

Why does the EF query plan cache eviction algorithm reduce the cache to its cleanup trigger size, causing a perpetual cleanup?

The cache eviction algorithm for query plan caching in Entity Framework is described in section 3.2.2 as this: Once the cache contains a set number of entries (800), we start a timer that ...
1
vote
0answers
63 views

efficient caching with complex user rights

I am currently learning about memcached/redis, and I am trying to figure out how could I use this kind of technology at work. Now I understand that you should mostly cache data which is common to ...
1
vote
0answers
2k views

Understand how the TLB (Translation Lookaside buffer) works and interacts with pagetable and addresses

So I am trying to understand this TLB (Translation Lookaside Buffer). But I am having a hard time grasping it. in context of having two streams of addresses, tlb and pagetable. I don't understand ...
1
vote
0answers
72 views

Built-in Context-and-Input-to-Output-Hashing in Compilers

Why doesn't (open source) compilers contain builtin funtionality for (shared) caching and reuse-fetching (using SHA1-hash of compiler-version, build-flags, target-platform and inputs) of executable ...
0
votes
1answer
25 views

Strategy to make sure relevant cache records are expired on data update

In our database, we have around 150 different tables. However, there are a handful of them that are key, as in they get referenced pretty much everywhere. We also have quite a few reports that we pull ...
0
votes
1answer
70 views

Design review for a Cache aside system

I am maintaining a system where a list of string ids are stored against a container (using the term here as a generic entity) object. The database used is MySQL and the table structure looks like this....
0
votes
1answer
39 views

How do I decide an initial in-memory cache size given my DB size and expected load throughput?

(Purely for learning purposes) Say the DB contains 1 billion rows with 200 bytes per row = 200 GB of data. The traffic at peak is 1000 requests/s, with each request asking for one DB row. What cache ...
0
votes
0answers
23 views

Is it ok to cache the user password in Hibernate two-level cache, if not, how to avoid it?

I am working on a blog system, and use Hibernate as my ORM framework. The blog system has Post and Comment entities. Both of them has a nested author field, associated with the User entity by a ...
0
votes
0answers
33 views

Best way to implement Shopify-like cache for products?

I'm currently building a shopping cart from scratch and am thinking of how I can cache the individual products as well as the product lists (e.g. Show All products page, Show 'Cakes' only page, Show '...
0
votes
0answers
27 views

Cache graph with hierachy

I'm looking to build a graph that's tied to any caching system that I can interact with. Its only goal is when an item is deleted, based on its "linked items", to also delete these. A partial rebuild ...
0
votes
0answers
51 views

How to elegantly allow for lookups/dropdowns to be loaded with items marked 'Inactive' without totally messing up caching?

Where the application has the ability to mark dropdown items 'inactive' - this means to the user that particular item is no longer in use and should not be shown in dropdowns. However, it is used on ...
0
votes
0answers
58 views

How to cache timestamp based key values with a distributed cache?

I have a dataset in a key value store (similar to Cassandra). The data model is - Key - ServiceName / timestamp_in_milliseconds value - operation In the write side I get some operations for a ...
0
votes
0answers
376 views

Using signalR for streaming alongside a microservice architecture

I have a cluster of micro services with an exposed search API serving a client app. I want to "stream" in real time the aggregated results of a complex search. The search will be kicked of by the ...
0
votes
2answers
467 views

Website redirect in cache to old website

So I've developed a website for a client, however he used to use this url with a re-direct to 'another' site of his. I had the re-direct cancelled, but whoever visited their old website before, still ...
-2
votes
1answer
47 views

Reducing duplicate API call between micro services in a latency sensitive flow

Let's suppose that I have 5 microservices, let's also name them ServiceA, ServiceB, ServiceC, ServiceD, ServiceE. To perform an operation X communication needs to happen between these services. And ...
-3
votes
1answer
70 views

How to exchange 1T data between multiple processes?

How to exchange 1T data between multiple processes? Requirements: Data < 1TB. Memory > 1T. Multiple processes (different languages) on the same machine or different machines over network Data ...
-5
votes
0answers
18 views

NUXT caching API requests

Im developing a project using Nuxt and I need to update the data 15 in 15 seconds, the api is a third party api and has a 100 api calls limit per day. I need to be able to make only 1 api call every ...