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

0
votes
1answer
59 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 ...
8
votes
2answers
3k 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 ...
0
votes
0answers
25 views

Application access layer vs data access layer: taking a choice between distinct 'fast' and 'big' stores served by Redis protocol

background story: So, we want to have a distributed cache available to all applications. (Non-concurrent writes, concurrent reads). In ideal case, the cache must be persistent and kept in RAM ...
0
votes
1answer
39 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
60 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 ...
213
votes
13answers
49k views

So Singletons are bad, then what?

There has been a lot of discussion lately about the problems with using (and overusing) Singletons. I've been one of those people earlier in my career too. I can see what the problem is now, and yet, ...
2
votes
1answer
477 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 ...
0
votes
2answers
204 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 ...
7
votes
5answers
3k views

Most Efficient Cache Replacement Algorithm [closed]

Wikipedia lists 11 cache replacement algorithms. Assuming I know almost nothing about the application I'm going to develop, what should I use as a "default" cache replacement algorithm? If I recall ...
7
votes
5answers
758 views

How do you off load work from the database?

In at least the web development field, web servers are everywhere but are backed by very few database servers. As web servers get hit with requests they execute large queries on the database, putting ...
0
votes
0answers
69 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 ...
2
votes
3answers
1k 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 ...
0
votes
1answer
198 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 ...
3
votes
4answers
709 views

What's the best way to cache a growing database table for html generation?

I've got a database table which will grow in size by about 5000 rows a hour. For a key that I would be querying by, the query will grow in size by about 1 row every hour. I would like a web page to ...
3
votes
1answer
169 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
137 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 ...
13
votes
1answer
533 views

Why do some websites showing 0 bytes in Chrome's developer tools

I am doing a page speed optimization for my website and studying how other websites do it. I noticed that some websites such as as Facebook or Ringgitplus show 0 bytes for some of their resources in ...
10
votes
4answers
338 views

Why are message view counts laggy on most web sites?

Notice how view counts of youtube videos are always laggy? For example, a video has like 1000 comments and still has 500 hits, and will have 10000 hits hours after. Youtube isn't alone in this. Most ...
0
votes
0answers
120 views

Redis Parent-Child Caching Strategy

We have trouble with our current caching mechanism and tracking which items need cleared out when an object changes. We are using Enyim Memcached which does not have Cache Dependencies. I have ...
1
vote
1answer
82 views

Invalidate cache over multiple applications

We have a suite of applications including a website, a client application and multiple windows services. All these applications work on the same dataset and use an in-memory cache. Of course, this ...
1
vote
1answer
203 views

Delivering and caching files in asp.net

The question is - what is an effective way to deliver files to users? Consider an asp.net application which gives an ability to view various files. A kind of image library or web file directory. Key ...
0
votes
0answers
168 views

Does Akamai implement if-modified-since?

I am trying to fine tune one of my applications that uses Akamai for CDN. I am serving resources that rarely change, but I'd like Akamai to check once in a while just in case. For this I set the ...
2
votes
5answers
1k views

Caching strategies - LRU, MRU, Clock-Pro

I am going to write a bachelor's science work on caching strategies and really, can't find any links to specifications or full descriptions of some of them. Only something like summaries from ...
3
votes
3answers
555 views

What are best practices for caching paginated results whose ordering/properties can change?

What is the best practice for caching paginated search results whose ordering/properties can be changed? Say, in my application, someone wants to see the last 20 discussion threads (out of 10,000). A ...
4
votes
1answer
1k views

How cache works in ServiceStack web services

I am new to caching and trying to understand how it works in general. Below is code snippet from ServiceStack website. public object Get(CachedCustomers request) { //Manually create the Unified ...
3
votes
3answers
2k views

Implementing cache system in Java Web Application [closed]

I worked with JPA (Eclipselink implementation) and Hibernate. As I understand these two have great caching systems. I am interested in caching in a Web application and in order to better understand ...
1
vote
1answer
115 views

Are “conditional” caching policies ever actually useful?

I'm designing an abstraction over ASP.Net's built in caching to make it not so horrible to use. One design decision I'm having to look at is if I should restrict people to using just one cache policy ...
6
votes
2answers
367 views

Versioned Resources to Improve Cacheability

Here's an API concept which could be useful for performance optimisation. It's an example of key-based cache expiry applied to a broader internet-wide context instead of the internal Memcached-style ...
4
votes
1answer
115 views

Is the UX affected negatively by fully cacheable pages?

I want to have fully cacheable pages in my websites, but one cannot do that if they contain user-specific data, like the userbar or things in the UI that can change depending on the permissions the ...
0
votes
2answers
630 views

Idea to develop a caching server between IIS and SQL Server

I work on a few high traffic websites that all share the same database and that are all heavily database driven. Our SQL server is max-ed out and, although we have already implemented many changes ...
3
votes
3answers
314 views

Is it ok to ignore poor performance for a resource that will be cached?

Let's say I have a web service that is poorly written and inefficient, but it's output is cached so there's no bottleneck. Do you just leave it? Would you go as far as to take deliberate shortcuts ...
2
votes
1answer
284 views

I am trying to figure out the best way to understand how to cache domain objects

I've always done this wrong, I'm sure a lot of others have too, hold a reference via a map and write through to DB etc.. I need to do this right, and I just don't know how to go about it. I know how ...
3
votes
1answer
318 views

Caching by in-memory dictionaries. Are we doing it all wrong?

This approach is pretty much the accepted way to do anything in our company. A simple example : when a piece of data for a customer is requested from a service, we fetch all the data for that ...
8
votes
3answers
590 views

What reasons are there to reduce the max-age of a logo to just 8 days?

Most websites set max-age=31536000 (1 year) on the Cache-control headers of static assets such as logo images. Examples: YouTube Yahoo Twitter BBC But there is a notable exception: Google's logo ...
2
votes
3answers
692 views

Synchronizing local and remote cache in distributed caching

With a distributed cache, a subset of the cache is kept locally while the rest is held remotely. In a get operation, if the entry is not available locally, the remote cache will be used and and the ...
3
votes
3answers
559 views

How to implement Cache in web apps?

This is really two questions. Im doing a project for the university for storing baseball players statitics, but from baseball data I have to calculate the score by year for the player who is beign ...
0
votes
2answers
486 views

Syncing objects to a remote server, and caching on local storage

What's the best method of sycing objects (as JSON) to a remote server, with local caching? I have some objects that will pretty much just be plain-text with some extra meta-data. I was thinking of ...
2
votes
1answer
170 views

Changing frontend cache

Our architecture consists of a front-end cache that most read only users obtain their data from directly. The front-end cache sits in front of a farm of webservers that serve pages written in PHP. We ...
5
votes
2answers
733 views

How can I best implement 'cache until further notice' with memcache in multiple tiers?

the term "client" used here is not referring to client's browser, but client server Before cache workflow 1. client make a HTTP request --> 2. server process --> 3. store parsed results into ...
1
vote
1answer
204 views

Where is a good place to start to learn about custom caching in .Net

I'm looking to make some performance enhancements to our site, but I'm not sure exactly where to begin. We have some custom object caching, but I think that we can do better. Our Business We ...
0
votes
0answers
58 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 ...
3
votes
2answers
780 views

Caching factory design

I have a factory class XFactory that creates objects of class X. Instances of X are very large, so the main purpose of the factory is to cache them, as transparently to the client code as possible. ...
2
votes
7answers
536 views

Caching's Effect on Program Performance

How does caching effect the performance of a running program? From my understanding, the assumption that each instruction always takes the same amount of time is not always correct, because of the ...
2
votes
1answer
188 views

How to keep track effectively of cache keys to invalidate them accordingly?

In an ordinary application, the same information may be retrieved from the database in several ways. If all those ways implement caching, you need to invalidate all those cache entries when updating ...
1
vote
3answers
713 views

How important is it to implement a caching system in an MVC style framework?

I am writing my own PHP framework (...waits for the groans to subside) for the purpose of learning (best practices, design principals etc.) as I'm entirely self-taught and consequently there are gaps ...
2
votes
1answer
94 views

For Which Kind of Cache will this Program not run well? How can it be optimized?

Consider the following code fragment: int a[8192], b[8192], c[8192]; int i; for(i = 0; i < 8192; i++) c[i] = a[i] + b[i]; For what kind of cache will this program not run well (set ...
3
votes
1answer
1k views

Caching strategies for entities and collections

We currently have an application framework in which we automatically cache both entities and collections of entities at the business layer (using .NET cache). So the method GetWidget(int id) checks ...
6
votes
1answer
216 views

Random Cache Expiry

I've been experimenting with random cache expiry times to avoid situations where an individual request forces multiple things to update at once. For example, a web page might include five different ...
0
votes
2answers
476 views

How to store cache?

The data in my website is stored in many different tables(friends,relatives,etc) and every-time I have to query each and every table. But all this data is subject centric. E.g. data for a person is of ...
5
votes
5answers
623 views

Would “Efficient C++” book be irrelevant now due to compiler improvements?

I am planning on purchasing this book to learn more about C++ programming with regards to fast code. However, the book was published in 1999 and I am worried most of it may be irrelevant now due to ...