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

learn more… | top users | synonyms (1)

0
votes
1answer
19 views

Optimizing and caching frequently accessed but rarely updated Tables

My app has some tables that will be rarely updated, probably just once in the beginning and at the system setup. Despite that, they will be frequently accessed. Almost every operation depends on ...
0
votes
1answer
43 views

Redis for caching

I've heard a lot of positive about Redis but have not used it myself. Now I want to add a cache layer for my web app to reduce the DB load, and I suppose Redis is fine for this. But I don't clearly ...
1
vote
2answers
80 views

Caching query results vs Querying each time (finding a middle ground)

This is kind of an expansion on a previously asked question Some background info: Querying Over 5,000 items from SQL database that eventually get sorted into a list depending on who the user ...
2
votes
1answer
68 views

Reuse already fetched data for request

I have action that fetches user model from db to check access. Then I have method that in some cases requires same model. function checkAccess(req, res, next) { var data = ...
0
votes
1answer
48 views

Cache policy categorization

From what I search online, there are 2 most common policies used in cache access: Cache aside Read through + Write through But there are some other policies like: For write hit case: Write ...
1
vote
0answers
45 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 ...
0
votes
1answer
82 views

Why are the test values the same for FIFO and LRU? [closed]

I had a computer science assignment where we compared FIFO, LRU and random policy for a cache memory. FIFO and LRU were equally good as improvements to a random policy. Why? Is it just a coincidence? ...
1
vote
2answers
113 views

Is storing data that rarely changes in-memory a good candidate for a singleton/cache?

I have a class called DataPoint that is defined like the following. Currently, it goes through each property on an object and based on the DataPoint, it does some formatting like padding, trimming, ...
0
votes
0answers
61 views

What is the design pattern name for a class that handles 2nd level caching? [duplicate]

I have a system where I want to start introducing some 2nd level caching. I want to abstract data access a bit and allow some type of other class to do the dirty work of fetching a DTO; it will check ...
29
votes
7answers
3k views

How can QA staff test caching logic that they can't see?

I just implemented a caching layer in my web application, and now I'm wondering how QA is supposed to test it, since caching is transparent to the user. One idea I have is to put logging in the ...
2
votes
0answers
30 views

Best way to accelerate data access to two data warehouses?

I am embarking on a business intelligence project which will require abstracting access to two existing data warehouses. I need to design an application architecture to allow self-service business ...
1
vote
1answer
101 views

Running an algorithm against a large dataset

We have a python application which does a DFS search against data in a database. Right now, that data is small so I can hold everything in a python container but the data is going to grow and there ...
0
votes
0answers
29 views

Cache Memory Vs Main Memory [duplicate]

Why is the access time of the cache memory lesser than the access time of the main memory? I have tried looking at the sites as - tutorialspoint.com, education-portal.com etc. I know that the ...
22
votes
3answers
2k views

Caching at business layer vs Caching at Data Layer

I have always worked on projects where caching was done on DAL, basically just when you are about to make the call to database, it checks if data is already there in the cache and if it is, it just ...
2
votes
1answer
44 views

Declarative caching on Collections

I am interested in using Spring's Cache Abstraction on a module that I am working with but all data operations are on collections to avoid multiple datasource invocations, so I am not sure I have a ...
0
votes
2answers
83 views

Updating particular properties of EF objects every X amount of days in MVC

I'm building an MVC ASP.NET IMDb-like website which presents various information about movies to users, relying on 3rd party APIs to (initially) fetch movie info. The IDs representing each movie on ...
1
vote
1answer
151 views

Relation between cache line and memory page

If I am correct, a page in a main memory is the smallest unit unit for transfer data between the main memory and an external storage device, such as a hard disk. A cache line of a main memory is the ...
1
vote
1answer
82 views

Possible to refactor these methods that contain the same logical flow?

I have many methods in many repositories that have the same logical flow: Retrieve value from Cache Check value If no value, fetch from Database Update Cache Return value Is there a way to ...
2
votes
1answer
298 views

Understanding memory update propagation in x86/x86-64 CPU L1/L2/L3 caches and RAM

I'm trying to understand in a general sense how L1/L2 (and now L3 caches) are updated and how the updates are propagated in a multi-core x86/x86-64 CPU to the other cores and eventually RAM. Assuming ...
0
votes
2answers
191 views

Pattern for caching DAOs: strategy or decorator?

I'm building a php system with the Services/DAOs/Domain Models pattern, and now is the time to implement a caching system for the DAOs. Would you use a decorator pattern, or maybe the strategy ...
3
votes
1answer
207 views

Object caching in this code too expensive?

I'm having some trouble with a game developed in Java which is kinda slow. I benchmarked it a little bit and found the problem: most of the time, the JVM is in the Object.<init>() since there ...
2
votes
2answers
134 views

Serving a Website as only Cached HTML Pages

Lets say that I want to develop a website where all pages will be dynamically generated and 'printed' into static HTML files. I will then serve these HTML files from a container (such as an Amazon ...
1
vote
1answer
451 views

Redis strategy for cache item dependency

I'm implementing cache structure using Redis, my domain is like this: There are multiple categories (3000+ categories). Each category contains multiple questions (around 20-30 questions per ...
2
votes
0answers
204 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 ...
0
votes
1answer
134 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 ...
2
votes
0answers
97 views

ASP.NET how to handle external application settings

I'm converting an application from C# WebForms to MVC. The application gets settings from a centralized location using Web Services. These are settings you would typically find in a Web.Config, but ...
8
votes
2answers
1k views

Dealing with browser cache in single-page apps

I'm trying to figure out how to properly handle the web browser cache for single page apps. I have a fairly typical design: several HTML, JS and CSS files implementing the SPA, and a bunch of JSON ...
0
votes
1answer
44 views

Storing and presenting custom table data

I have a web site upon which I want to provide users the ability to create tables of data. These tables will come from a predefined list of table definitions of which I will be adding to myself. This ...
1
vote
1answer
139 views

Where to store front-end data for “object calculator”

I recently have completed a language library that acts as a giant filter for food items, and flows a bit like this :Products -> Recipes -> MenuItems -> Meals and finally, upon submission, ...
2
votes
4answers
180 views

Optimizing code by using registers, but what if they are not enough in number?

One way to optimize code is to minimize the access to arrays and use variables instead, because that way we use registers instead of loading data to cache memory. For example, if in a loop I'm going ...
1
vote
1answer
168 views

URLs with variable query strings and cache

I am developing a media server, the basic functionality is to serve an image, which is done the following way /media/:id where :id is the id of the image. You may want to ask for a specific size, ...
2
votes
1answer
238 views

PHP Cache Strategy - Genius or Sheer Stupidity?

I have a shared hosting with limited capabilities. Memcache and mod_cache are not available to me. I would like to implement my own PHP caching method to cache the results of load-intensive SQL query. ...
3
votes
1answer
358 views

Caching large amount of ajax returned objects

I'm building an application which fetches large amount of items with ajax requests via other application API. It returns me 6k - 30k js objects which are used multiple times across various application ...
0
votes
2answers
150 views

Image caching when rendering the same images on different pages [closed]

I'm told to think about caching of images that will be displayed on the page. The images will be repeated throughout the website on different pages and I'm told to figure out the best way to cache ...
1
vote
0answers
41 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
1answer
114 views

Cache concurrency: ensuring latest version in cache

We have a data service app working on object graphs. We place some complex graphs in a (memory) caching tier as a single data item, so as to avoid the length of time to retrieve every individual data ...
0
votes
3answers
294 views

Best practices for caching search queries

I am trying to improve performance of my ASP.net Web Api by adding a data cache but I am not sure how exactly to go about it as it seems to be more complex than most caching scenarios. An example is I ...
40
votes
5answers
9k views

Why is CPU cache memory so fast?

What makes CPU cache memory so much faster than main memory? I can see some benefit in a tiered cache system. It makes sense that a smaller cache is faster to search. But there must be more to it.
0
votes
2answers
316 views

Intel Nehalem/SB/IB/Haswell CPUs, cache vs TLB

On the Nehalem+ architecture Intel CPUs what is the interaction between the L1 cache, L2 cache, L1 DTLB and L2 DTLB? On all the images I have found there isnt a clear explanation whether the CPU looks ...
0
votes
1answer
62 views

Mail Server Caching

I'm currently working on a web mail client. When a user logs in, I'm fetching all the mails from the INBOX from the beginning of time. As expected this is pretty darn slow. I'm planning to implement ...
1
vote
1answer
367 views

Should processing/filtering be performed client side or server side for catalog based apps

Device targeting for product XML catalog We currently have a webservice that outputs an XML of products based on get parameters in the request. The webservice is consumed from a windows mobile ...
1
vote
2answers
634 views

What is the best way to build a static page web site from a JSON API?

I have a JSON API that includes some discusssions. I want to build a static html site on another server, pages that are built from data on that API. I am more comfortable using Rails than Node. The ...
0
votes
1answer
219 views

Are there any concerns with using a static read-only unit of work so that it behaves like a cache?

Related question: How do I cache data that rarely changes? I'm making an ASP.NET MVC4 application. On every request the security details about the user will need to be checked with the ...
3
votes
3answers
3k views

How do I cache data that rarely changes?

In my ASP.NET application there is some data that doesn't change often and so there is no point in querying the database to re-check it every time. In my current situation I am checking user ...
1
vote
1answer
226 views

Complex knowledge management system with CRM..written internally

We've all heard of salesforce and sugarcrm and the likes of systems like this. Unfortunately at my workplace we have been asked to write a similiar system (rather then license or purchase). Basically ...
0
votes
0answers
803 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 ...
2
votes
1answer
1k views

AngularJS dealing with large data sets (Strategy)

I am working on developing a personal temperature logging viewer based on my rasppi curl'ing data into my web server's api. Temperatures are taken every 2 seconds and I can have several temperature ...
3
votes
1answer
230 views

At what point does caching become necessary for a web application?

I'm considering the architecture for a web application. It's going to be a single page application that updates itself whenever the user selects different information on several forms that are ...
2
votes
1answer
399 views

API Caching Layer

Primer: We have a mobile app being served by an API (written in PHP). The main point of the app is to display products from a large items table in the database, in a multitude of different ...
1
vote
1answer
536 views

Pointer access and cache coherency

To my understanding, when you access a variable, that variable and the surrounding area of memory is put into the L1 cache. If I'm wrong here, please tell me. Now my question is, say I have an array ...