caching

Caching of current user specific pages

We are using Smarty Templates on our LAMP site but my question would also apply to a site running Memcached (which we are planning to also bring online). Many of the pages of our user generated site have different views depending on who is looking at them. For instance, a list of comments where your own comments are highlighted. There...

How to determine the size in bytes of the ASP.NET Cache?

I'm in active development of an ASP.NET web application that is using server side caching and I'm trying to understand how I can monitor the size this cache during some scale testing. The cache stores XML documents of various sizes, some of which are multi-megabyte. On the System.Web.Caching.Cache object of System.Web.Caching namespace...

smarty cache and login states

I was wondering. How do you guys deal with scenario of website where you have login and log out states at the top. So if someone is logged in, you say "Hello Scott". If someone's not logged in, it says "Log In". I am using force compile = false. And using (!$smarty->is_cached('index.tpl',$template_cache_id)) { do something } What do...

Flex and PHP code with IE Cache or POST issue

I have a Flex application that uses a rich interface. The user can create data and have it instantly show up in a list of data that they have created. The data is stored in a MySQL database using HTTPService POST requests from the Flex application and PHP forms to handle the data on the server side. For sake of explanation, let's say the...

Remove specific image from cache?

Is there a way to "uncache" an image file? I don't want to add a cache buster to the image src (it is a user avatar image) since I don't want to have to load the image on every page view. Basically the problem is that when a user uploads a new avatar, it won't show up until they reload the page since the old one is still in cache with ...

Httpruntime cache keys not unique?

Although i have specified a unique key, it seems the following code will return one value for 5 requests, then another for the next couple, then revert back to the value saved in the original request and just continue until there are 10's of different objects all stored under the same key. It then seems almost random which of these value...

Threadsafe double buffered cache (not for graphics) in Java?

I was recently looking for a way to implement a doubly buffered thread-safe cache for regular objects. The need arose because we had some cached data structures that were being hit numerous times for each request and needed to be reloaded from cache from a very large document (1s+ unmarshalling time) and we couldn't afford to let all r...

Sould I cache Gravatar icon or access image directly?

In the context of having a list of user that has an icon next to their name, is it better to cache all images of Gravatar for few minutes or it's fine to directly display the image from Gravatar? The list is around 200 users on every pages. ...

How to design database tables that are cache friendly?

I would like to design a database that is accessed through a very slow network link. And luckily the database itself is pretty static. So I'm going to use aggressive caching of the results. From time to time, other insertion and updates may happen on tables while the client is running, so I would like to design a low-bandwidth system whe...

Selectively caching models with cache_money

Instead of doing this in the cache_money.rb initializer class ActiveRecord::Base is_cached :repository => $cache end I want to be able to selectively cache only certain models (the reason being our User model breaks memcached because it's generally too large to be serialized properly). class User < AR::Base is_cached :repository ...

Update panel implementation ?

Hi, I was looking around the web for some information about, how the update panel is implemented in asp.net ? Was looking for how the caching of the update panel script which is served through axd and the query string generation for it. Yeah, I can go through the scripts but I think it will definitely not written keeping me in mind ...

Is there a caching penalty for mixing binary data and instructions within close proximity of each other?

I'm procedurally generating 128-byte blocks with some set n-byte header reserved for machine-language functions that I'm simply calling via in-line assembly. They aren't defined anywhere and are generated at run-time into pages allocated into memory with access for execution. However, I want to reserve the end (128 - n) bytes of these ...

Default duration of Cache.Insert in ASP.NET

If I have the following line, when should I expect the cache to expire? System.Web.HttpRuntime.Cache.Insert("someKey", "Test value"); ...

How do you get the original control instance from a staticpartialcachingcontrol?

I'm output caching a usercontrol and it wraps it into a staticpartialcachingcontrol class. I somehow need some way to walk backwards and grab the original control instance, either through a strongly typed usercontrol or virtual name/path. Any ideas? ...

Get cached Entity by ID without call to db.

How can I implement GetItemFromCacheById function, such that it takes object from linq-to-sql cache, instead of calling the database. using (var cxt = new DbDataContext()) { // Read item into the cache Item item = cxt.Items.Where(x => x.Id == 1).Single(); //... item = GetItemFromCacheById(cxt, 1); } ...

Is there a Python caching library?

I'm looking for a Python caching library but can't find anything so far. I need a simple dict-like interface where I can set keys and their expiration and get them back cached. Sort of something like: cache.get(myfunction, duration=300) which will give me the item from the cache if it exists or call the function and store it if it doe...

Workaround for LINQ to SQL Entity Identity Caching and Compiled Query Bug?

I've come across what appears to be a bug in linq to sql where identity caching does not work when performing primary key queries inside of a compiled query. I wrote the following sample to demonstrate the usage of identity caching. It only executes one call to the database the first time it's hit, every time after that it retrieves the...

Adobe Flash Player Cache: Does data persist across different users of a system?

Does anyone know if adobe flash player cache data is available to other users on a system? For example: A user logs onto Windows XP, then uses my adobe flex application... and in the process of doing so downloads the signed flex lib... He then decides to mow the lawn and log off. At about 3pm the same day, his Mum can't hear the TV o...

RVDS cache hit/miss

Hi I am using RVDS 4.0 I am running my code ARM926EJ-S RVISS core simulator. Can anyone tell me is it possible to detect cache hit/ miss in simulator ? If so how to find cache hit/miss in simulator? Regards, Manish ...

Caching question MySQL or Filesystem

Hi, is there a noticeable speed performance difference when you cache the data which you retrieve from the database to a file on the filesystem (eg.: htdocs/cache/cachefile) rather than grabbing it directy from the MySQL DB? Thanks a lot! ...