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)

1
vote
3answers
489 views

Add javascript to all pages (for caching), or only to the pages that require the scripts (for a smaller page size)?

I'm using bits of javascript on my website for an image gallery, smooth scrolling, etc. These scripts are not used on every page (not every page has an image gallery for example). However, the scripts ...
1
vote
2answers
514 views

Preventing Web Site Users From Using Their Back Button To Get To Cached Screens After Logging Out?

I have a legacy Java webapp ( Spring 3.1 MVC, legacy servlest and JSPs ) I have modified to log the user out after s/he clicks an external link to leave the web site. The last screen(s) s/he was on ...
6
votes
1answer
230 views

Hardware that accelerates pointer dereferencing?

Most modern languages make a heavy use of pointers / references: a typical OOP language uses VMT lookups, a typical functional language builds key data structures out of pointers, etc. Even typical C ...
1
vote
2answers
85 views

What to call objects that may delete cached data to meet memory constraints?

I'm developing some cross-platform software which is intended to run on mobile devices. Both iOS and Android provide low memory warnings. I plan to make a wrapper class that will free cached resources ...
0
votes
3answers
349 views

How do I handle 3rd party search result data (via cache)

I have a search function on my site and it is taking data from 6 different 3rd party resources. The problem is, it takes too long requesting the data over and over again on the results page. I've ...
1
vote
2answers
400 views

Multiple orders in a single list

I have a problem with a ranking system I am using. Scenario: An online game with around 10k players calculates a real time ranking of points when a certain event occurs. Events don't occur that ...
0
votes
1answer
136 views

Running entire frontend of a system on a flatfile cache

I'm in the middle of moving away from PyroCMS to a custom solution built on Laravel. Wont go into the details as to why here, but it is a necessity. I'm toying with the idea of caching things like ...
1
vote
1answer
327 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 ...
1
vote
1answer
101 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 ...
4
votes
2answers
666 views

caching on multiple servers

Because we need to keep response times low, we get tons of requests, and we need to basically process ALMOST the same data (which I'll refer to as X) each request (the inputs are different though, so ...
5
votes
3answers
1k 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
2k 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 ...
1
vote
1answer
48 views

When to apply corrections on data gathered from a server

I have an program that collects data from other servers. I don’t have access to these servers so I can’t change anything. The servers can give incorrect data, I can solve the problem but I’m a little ...
3
votes
4answers
313 views

Senior team members want to move query-relevant persistent data from DB to cache. Does this make sense?

I am a young engineer recently employed at a small company that sells products to the general public. We use Ruby On Rails and MySQL. Our database has a lot of customer data, but a great deal more of ...
10
votes
6answers
2k views

Best practices for unit testing methods that use cache heavily?

I have a number of business logic methods that store and retrieve (with filtering) objects and lists of objects from cache. Consider IList<TObject> AllFromCache() { ... } TObject ...
1
vote
1answer
119 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 ...
7
votes
2answers
459 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 ...
6
votes
2answers
429 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 ...
0
votes
2answers
1k 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
316 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 ...
3
votes
1answer
634 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 ...
3
votes
1answer
479 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 ...
8
votes
3answers
643 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 ...
4
votes
1answer
121 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
772 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 ...
1
vote
0answers
65 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 ...
4
votes
2answers
1k 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
901 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 ...
4
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 ...
2
votes
1answer
178 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 ...
2
votes
1answer
229 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
1k 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
111 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 ...
4
votes
1answer
2k 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 ...
7
votes
1answer
256 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
624 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 ...
4
votes
5answers
678 views

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

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 ...
4
votes
1answer
1k views

(How can I / Am I allowed to) Use Google Maps as a Texture on an OpenGL object?

Note: I asked a very similar question on StackOverflow but did not get much attention, so was directed to http://programmers.stackexchange.com as licensing issues seem to have more interest here... I ...
4
votes
3answers
365 views

Does C# Cache Calculation Results?

I am recently building a basic ray tracer in C# from scratch, as a learning/teaching project. A previous release of the project (let's call it A) does reflections and diffuse shading. The program ...
3
votes
2answers
358 views

Memoization, Caching, Buffering and Page Filing?

I'm writing something on how iterative Fibonacci is substantially better than recursive Fibonacci - a few lines. The main reason of this I find, as do many prominent researchers I believe, is that you ...
3
votes
3answers
778 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 ...
17
votes
2answers
12k views

Writing low latency Java [closed]

Are there any Java-specific techniques (things which wouldnt apply to C++) for writing low latency code, in Java? I often see Java low latency roles and they ask for experience writing low latency ...
0
votes
1answer
828 views

Caching Business Objects in MVC application

I figured this was more of an architectural question, so I chose to post it here rather than Stack Overflow. So I'm building an MVC web application and have just finished writing the code that wraps ...
2
votes
2answers
429 views

Advice on caching/updating data in memory for silverlight client

Currently in my Silverlight app I'm polling the database for changes to cached objects and am looking for advice on how to update the views that are displaying these lists. Example: I have a static ...
9
votes
5answers
3k views

What data structure should I use for this caching strategy?

I am working on a .NET 4.0 application, that performs a rather expensive calculation on two doubles returning a double. This calculation is performed for each one of several thousand items. These ...
1
vote
1answer
215 views

Is using dynamically generated code as cache a good idea?

I have a web search interface that can compare products in a table. This data set changes a few times a week. I have been storing a "DISTINCT" list (used for parametric selection) in a cache table. ...
2
votes
3answers
1k 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 ...
1
vote
1answer
215 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 ...
9
votes
2answers
5k 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 ...
1
vote
1answer
250 views

When should I invalidate a cache of a user's credentials?

We develop a Windows client application that locally caches a user's credentials for connecting to our server application using the Windows Credential Management API. Our caching logic works in the ...