caching

Converting Ruby to C#

Need to convert the following code from Ruby to C#. However I'm kind of puzzled by the use of the yield keyword and the general syntax of Ruby. Can anyone that knows a little bit Ruby please help out and convert the code class < < Cache STALE_REFRESH = 1 STALE_CREATED = 2 # Caches data received from a block # # The difference between ...

ASPX That Returns An Image - Output Cache-able?

Greetings! I've created an APSX web form that returns a remote image based on some supplied parameters. It can be used like this: <img src="/ImageGetter.aspx?param1=abc&param2=123" /> ImageGetter.aspx's markup and code look similar to this: <%@ OutputCache Duration="100000" VaryByParam="*" Location="ServerAndClient" %> <%@ Page Lan...

Cache lookup performance

We have a big winforms C# application, that's basically a frontend for some databases (CRUD stuff) and I'm trying to implement some in memory cache for business objects. Something like: List<Customer> customerCache; // Loaded during app. startup I've already created some code to keep the cache up-to-date with the database. This code...

Asp .Net File Caching

Hi, is any way to cache a whole folder with resources in ASP.NET without write own HttpModule? e.g.: folder with Wysiwyg editor javascript and styles ...

Prototype's Ajax.Updater not actually updating on IE7.

I am trying to submit a form using Ajax.Updater and have the result of that update a div element in my page. Everything works great in IE6, FF3, Chrome and Opera. However, In IE7 it sporadically works, but more often than not, it just doesn't seem to do anything. Here's the javascript: function testcaseHistoryUpdate(testcase, form) { ...

With Rails, How can I expire the Browser's cache?

I have an issue with my Rails application and the browser's cache: When a user logs out of the authenticated section of the site, they are still able to use the back button on the browser to see the authenticated page. I do not want to allow this. How can I expire the cache and force it to reload. Thank you ...

Is that possible to cache UIWebView in iPhone?

I was using NYTimes iPhone application, I become bit curious when I notice that it cache UIwebview even though I didn't open that article.Does anyone have idea how to do that? How NYTimes iPhone application doing offline reading? Any help greatly appreciated. Thanks, Amit ...

Bypass all cacheing on jQuery.autocomplete(1.02)

I am using jQuery.autocomplete(1.02) on my search box and I want exact string and substring matching. I don't care (yet!) about the database load, I'm happy for it to fire off a query every keystroke and bypass the caching entirely - I just don't want anything missed. To this end I have tried setting cacheLength=1, the minimum permitted...

Do proxied assets get cached?

I have an application and in order to get the images to load into the app I had to use a proxy. So the urls for the images are not .jpg they are .php?var=value They seem to load much slower even after they have already loaded once, I don't really know how it works, but I am thinking that the proxied images are not being cached. Am I corr...

Is it there any LRU implementation of IDictionary?

I would like to implement a simple in-memory LRU cache system and I was thinking about a solution based on an IDictionary implementation which could handle an hashed LRU mechanism. Coming from java, I have experiences with LinkedHashMap, which works fine for what I need: I can't find anywhere a similar solution for .NET. Has anyone deve...

delete *.pyc

I have three modules as: one.py: def abc(): print "Heeeeeeeeeeeiiiiiioooooooooo" two.py: import one def defg(): one.abc() three.py: import os from time import sleep import two two.defg() sleep(20) directory = os.listdir('.') for filename in directory: if filename[-3:] == 'pyc': print '- ' + filename os...

How do I expire a view cached fragment from console?

Something like Rails.cache.delete('site_search_form') doesn't seem to work. Is this possible? Thanks. ...

Force the browser to cache a request to a Castle MonoRail action?

In our project, we have a whole bunch of small css/js files, so when we build views we find ourselves writing many <link> or <script> tags, forcing the browser to make many requests for our css/js content. To remedy this, we started looking for a way for server to shore that all up into one request that dumps every css file or every js ...

Is there a way to caching mechanism for Class::DBI?

I have a set of rather complex ORM modules that inherit from Class::DBI. Since the data changes quite infrequently, I am considering using a Caching/Memoization layer on top of this to speed things up. I found a module: Class::DBI::Cacheable but no rating or any reviews on RT. I would appreciate hearing from people who have used this or ...

HttpRuntime Close does not remove items from the Cache as advertised.

I've created my own cache manager for a web site I'm developing and I was looking to find the best way to clear the cache under certain circumstances. I found many articles saying the proper way to clear the cache is to call HttpRuntime.Close() However, in my unit tests setup I call the encapsulated function HttpRuntime.Close() and the...

What' the expected release date for Microsoft Velocity?

CTP3 was released in March, is there any expected release date for v1? ...

when is using Cache is to much ?

hi, i am really struggling finding the best solution, what is really confusing me is as long as .net framework purges low priority cached items why should i worry about memory ( i know it is a dump question) ? can i really constrain an ASP.net Caching to use certain amount of RAM, not from IIS cause my site is on shared hosting, also ...

Cache efficient code

This could sound a subjective question, but what i am looking for is specific instances which you would have encountered related to this. How to make a code, cache effective-cache friendly? (More cache hits, as less cahce misses as possible). from both perspectives, data cache & program cache(instruction cache). i.e. What all things in...

What is the best Rails caching option for largely static pages with a dynamic header

I have a set of largely static pages which I'd be happy to page cache for relatively long periods apart from the fact that their layout includes a much more dynamic header. The most promising idea so far seems to be using action caching without layout :- class SomethingController < ApplicationController caches_action :index, :layout...

fast local database

i have a desktop application that talks soap to a server. the communication is very slow so i want to download a lot of the data up front and query from my local database. i wan this local data to persist after the application shuts down so what is the best way for doing this . . . are there any good products / examples to do this . . ...