Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [caching]

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

0
votes
0answers
18 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
0answers
37 views

Using Jcache or vendor-specific solution for caching [on hold]

Couple years ago I was working with Ehcache and Hazelcast. Back then JCache was something new, same as Caching in Spring. I got a new project recently, which requires refactoring and replacing old ...
0
votes
0answers
31 views

Hot Partitions in Redis Cache (In memory caching) [closed]

This question is not specific to any particular caching implementation. Generally when we talk about any nosql database they suffer from hot partition issue. Does the same issue occur in caching as ...
0
votes
1answer
45 views

How to solve cache eviction when not using distributed cache in microservices?

Let's say we will not use distributed caching because we want that our microservices are independent and they do not have many single point of failures. Either we will have in-memory cache (simple ...
-2
votes
1answer
49 views

Montoring website for Job scheduling software [closed]

I have a job scheduling software that uses Unix cron for scheduling a job. Unix Cron takes care of launching a Job process at a specified time. Each run of Job has a key (job_name and a date) ...
-2
votes
1answer
46 views

Do I need a redis for caching object while MongoDB already cached frequently accessed items

I'm using mongodb for our web application. Recently I'm think of adding redis for caching objects which usually is the setting/configuration. But the mongodb already cached the frequently accessed ...
1
vote
1answer
57 views

Pros and Cons of using ASPNET.Core In-Memory Caching instead of Redis? [closed]

I know redis is a very robust caching solution and scales great, but when it comes to simpler non-enterprise websites I feel as if it's a bit too expensive (Azure Standard/C1: $100/m). I'm ...
1
vote
0answers
35 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 ...
3
votes
2answers
141 views

Preventive measures for stopping developers from forgetting to update cached values

I'm at the point where results need to be cached to make the application more responsive. From experience in a previous project, countless (to say the least) bugs occurred because there was lots of ...
2
votes
1answer
45 views

How is caching used within messaging apps?

I'm actually studying about web development. I was just asking why a lot of web apps and chats(Whatsapp, Telegram, Discord, and a lot, a lot more!) are using cache. I mean, after learning cache ...
0
votes
1answer
86 views

How to store counters on Redis while minimizing potential data loss

The application I'm working on has a need to create a counter representing the number of times each piece of content has been viewed. There are two goals here: Update the counter in real time ...
3
votes
3answers
551 views

How to align on both word size and cache lines in x86

From what it sounds like, a 64 bit processor means aligning to 64 bits, which means if you have unicode utf-8 stored in there, each 8-bit chunk would take up 64 bits of space. That doesn't really make ...
1
vote
3answers
57 views

Calculating Journey Summary made by a vehicle and Cache them to database

This is more of a point me in the right direction kind of question, I have 2 solutions but both of them are invalid because the data calculated is invalid in some scenarios. I am working on a system ...
0
votes
1answer
104 views

Cache vs DB design decision?

Number of times this question comes to my and my team mind, should we persist or cache the data. I understand some time there is functional requirement that we need to persist in DB. But in my case ...
2
votes
1answer
70 views

Data points to use cache or database for these three major features under scalable ecommerce? [closed]

Auto-completion :- When we start typing, does system suggest the product from cache or hit the DB every time or hit the DB only when no result found in cache ? Search:- When enter any product, does ...
-2
votes
1answer
134 views

Design for 'inbox' with 'unread' feature

I am implementing a similar feature like the StackExchange Inbox and I have many considerations about the resource usage. My system has inbox messages, system health notifications and Achievements. ...
1
vote
1answer
44 views

Managing cache when matching datas

I'm retrieving values from 3 tables in database and trying to make them match. I was wondering how I could manage cache in an elegant way. I can't change the database structure even though one of the ...
3
votes
1answer
1k views

Microservices - sharing data through distributed in-memory cache?

I'm fairly new to both microservices and shared in-memory databases like Redis. I'm wondering though if it would be a good idea to combine the two to address the challenges of data duplication, ...
3
votes
1answer
173 views

API design and storing custom queries from Db to cache

I was thinking about how people actually implement utilising results from a cache before a doing database lookup. When designing an API, should there always be a manual check to the cache first before ...
1
vote
1answer
71 views

How to go about accessing data on a server that has large downtime periods

Where I work, there is an Oracle data warehouse that is managed by another group that contains some pretty critical information for the company to run smoothly. The issue is that they (apparently, ...
0
votes
2answers
337 views

Preventing abuse of API which is called via client side Javascript

I'm setting up an AWS API Gateway + Lambda micro-service that will return non-sensitive but user-specific data.This means that the responses from the service can't be cached and served to multiple ...
-3
votes
1answer
163 views

Design the cache and search feature like hotel booking?

I need to design the feature like in encommerce(consider hotel booking site) we can enter the keyword/partial-keyword and need to return the relevant results. For Example :- If site admin or hotel ...
0
votes
1answer
47 views

What is the name for an object saving a cache of the result of operations as part of requests? [closed]

What is the conceptual term for a service that will respond to a request for a resource by: checking for its copy in a cache if it exists and isn't stale, returns it if it doesn't exist or is stale, ...
1
vote
3answers
77 views

Performance on highly filterable web pages

In our application we have a page were we list our entities with many options to filter and to search. Over time this page got slower and slower especially for large datasets, so we thought about how ...
2
votes
3answers
86 views

Web page: randomised collection of paged items retrieved via rest api call

Using .Net web api I have a web page that renders a collection of items depending on filter values applied via an ajax call to an api endpoint. The items are paged so that if the user scrolls to the ...
0
votes
1answer
658 views

Pattern for web service response caching, but only use the cache for when the data store goes down or request otherwise would fail

We have a REST web service written in C# in ASP.NET MVC/WebAPI. When the underlying data store fails, this can lead to our service being completely unavailable, instantly. There is currently no ...
0
votes
1answer
84 views

RESTful API get requests by “modified” condition from mobile app

Currently I have following scenario. I have two projects: ASP.NET Core Web API and Xamarin.Forms app. General idea is to have consumer (Xamarin.Forms app) which is getting data from server (Web API)....
1
vote
1answer
231 views

Caching data based on dependency-graph

My team and I are currently maintaining a caching system that is purely based on keys. From what I've read we are striving for a system that's based on the cache-aside strategy. Where we have a ...
2
votes
4answers
270 views

What to call data that's not ready yet?

I often see the term stale used to refer to data that is out of date, and fresh to describe data that is up to date. Both of those make sense to me. But what do you call data that is not yet fresh, ...
1
vote
0answers
129 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
1answer
85 views

Distributed BiPartite Graph [closed]

I have a use case where I have a Bi-Partite Graph. Call one type of nodes "Type A" and the other "Type B." Now when a Type A node gets added, it forms some edges based on a criterion with Type B nodes ...
2
votes
1answer
422 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 ...
1
vote
2answers
1k views

Caching mechanism for REST APIs

I have been given a project recently where REST API have been implemented in the most basic way possible i.e. request comes to app, app hits controller, queries db, returns response. So this ...
1
vote
0answers
85 views

Cache sync across nodes in a cluster

I recently started working on a Spring web application, in which a cache for some heavily used data is stored in the JVM of each node in the AWS cluster. Any change in any of the node values results ...
0
votes
2answers
153 views

Web Service API Return Type

I'm trying to find some opinions on best practice for returning different types of data for the "same" endpoint. Surprisingly, I can't find much on this subject. Basically, I am building an API for ...
-1
votes
0answers
57 views

Caching login requests

I am working on an authentication API that users or clients will POST login credentials like username/password or client id/secret to get an access token. This service may have fairly high traffic. ...
1
vote
1answer
601 views

How to handle caching and database management in microservices architecture?

I'm getting into microservices architecture and there are some issues which are badgering me. The main advantage of microservices is scalability. Let's say that I have service and I'm running 1-n ...
0
votes
4answers
197 views

How to implement “viewed: N times” functionality for an article?

How will I have to update "views_count" each time(!) a user loads my page? It will be costly. And I don't need such accuracy when I update "views_count" after a user loads a page. Then is there any ...
1
vote
2answers
1k views

Realtime statistics of last 60 seconds with O(1) time and memory [closed]

What would be a clean design for an app that is to store transactions and return a overview of the ones received in the last 60 seconds, operating in constant time and memory (O(1))? The app should ...
0
votes
2answers
86 views

Strategies for avoiding expensive batch searches

We have a list of about 100, 000 customers. Every night, we run a batch search of these customer names against a list of known criminals/suspicious persons. This list contains around 1 million entries....
5
votes
2answers
753 views

Using `304 Not Modified` and `If-Modified-Since` on a REST API as a cache strategy

I have the following scenario: a client app that consumes a REST API. The client is a mobile application. Therefore, it caches the API data for bandwidth saving and offline support. With REST it can ...
0
votes
1answer
112 views

Memoization in case of recursive interdefined functions in Haskell/Functional Programming?

I was reading Memoization with recursion which tells how for a recursively defined function fun we can do memoization by: -- Memoization memoize f = (map f [0 ..] !!) -- Base cases g f 0 = 0 g f 1 = ...
5
votes
4answers
496 views

Storing objects whose size are run-time dependent contiguously in memory

The background I am working on an ECS in C++ for fun and I am trying to make it as efficient as possible. One of the optimisations I am striving to implement is to minimise cache misses by storing ...
4
votes
3answers
5k views

Implementing a caching microservice by avoiding potential bottlenecks

The system I am working on employs quite a sophisticated caching/preloading mechanism for external third-parties, and since it is built on a microservice architecture, I would like to extract the ...
4
votes
1answer
255 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
1answer
418 views

Django: caching properties for non-changing entries

I am wondering if it is a good idea to do the following: I have a Django model (which is related to a migration, therefore it has a database entry) with a bunch of properties. Accessing these are ...
3
votes
1answer
874 views

How does Redis (or any typical distributed cache) handle replication conflicts?

Suppose you set up a Redis cluster with one master and two slaves. Two clients are connected to each of the slaves. Both clients make conflicting changes at the same time: What happens if these ...
5
votes
1answer
396 views

HTTP cache or in-memory cache

I have two options for implementing caching in my web application. I can either add a Varnish cache outside of my application code, and cache the responses on a per-request URL basis, or I can use an ...
1
vote
1answer
538 views

Near real-time analytics from Cassandra with frequent updates

We have an activity metrics page where users can select a date period and see other user's aggregated activity (by action) and optionally filter everything by 4 or 5 fields. Actions happen ...
-2
votes
2answers
206 views

Possible methods of accessing L1 cache and specifying threads/cores

A faster prime number generator with hyperthreading and L1 cache About five years ago I wrote a simple VB widget to generate the first one million prime numbers and then port them to into its single ...