Given an ASP.NET 2.0 page with the following code in a button click event...
Protected Sub btnQuickRpt_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnQuickRpt.Click
Dim uniqueReportId As String = GenerateQuickReport()
' Opens the report on page reload.
ClientScript.RegisterStartupScript(Me....
Hi all,
I have a Comment model that belongs_to a Message. In comments.rb I have the following:
class Comment < ActiveRecord::Base
belongs_to :message, :counter_cache => true, :touch => true
end
I've done this because updating the counter_cache doesn't update the updated_at time of the Message, and I'd like it to for the cache_key....
I am writing out a navigation structure of categories. Each category has an ID, that is located in a 3rd party search tool. At either app start, or at various intervals, I need to get the caetegories and their id's, and store them in a dictionary (or some other way) so that I can access them for link rewriting from id to name.
...
I've been looking at the spring.net approach to caching (using aop), since my project already has a dependency upon spring.
However, I was surprised to find that you can only configure the caching rules declaratively as attributes. You dont seem to be able to configure the caching in a seperation configuration file..
Is anybody aware o...
We're in the last stage of a project and started optimizing it.
After a few tests, we realized that most (if not all) of the time spent loading a page, is spent in Doctrine.
Out of 5 seconds page load, 3 - 4 seconds are spent only on 2 Doctrine queries.
We've enabled query cache on the mysql server and on Doctrine as well as result ca...
I'm working on setting up caching for my site, but am having difficulty testing whether the caching is working properly or not. I've got the following in my controller:
public function read($id, $slug = null)
{
$this->cache = Cache::instance();
$story = $this->cache->get("story".$id);
if (!$story) {
$story_model = new Story_M...
I have a small system consisting of a .net client and a java web service.
The .net client inserts an object into the database, and then calls the web service. The web service tries to retrieve this object using hibernate. First time it works fine, but every other time it says that there is no object with the given identifier.
I have ch...
This only clears items in the user cache:
public static void ClearCache()
{
foreach (DictionaryEntry entry in HttpRuntime.Cache)
{
HttpRuntime.Cache.Remove(entry.Key.ToString());
}
}
Is there any way to access the kernel cache as well?
Clarification: I want to print the keys of all item...
Hello community,
I wanted to ask you what is the best approach to implement a cache in C#? Is there a possibility by using given .Net-classes or something like that? Perhaps something like a dictionary that will remove some entries if it gets too large but whose entries won't be removed by the garbage collector?
Thanks in advance
Seb...
I've been trying to create an universal asset loader class (with help of the folks here at stackoverflow), which remembers previousely downloaded assets by storing them in an associative array.
This is the end result:
AssetLoader.as
package
{
import flash.display.Loader;
import flash.events.Event;
import flash.net.URLReque...
I am writing a small application which serves images from the local computer, so they can be accessed as http://localhost:12345/something/something (which returns a jpeg).
How can I force the browser to cache this, so only a single request would be sent to the server. Would this header be sufficient
HTTP/1.1 200 OK
Cache-Control: publ...
My application would perform a large number of matrix operations (e.g., add/ multiply) on dense matrices. I would like to cache unique results in order to avoid duplicate computations.
Dense matrix:
typdef struct denseMatrix{
int m;
int n;
double **d; // actual matrix
multiplyTable **entry; // key & result
} dns;
Table...
Hi,
I have a web application and it is done in VS 2003[C#].
There is a frameset which is divided into 3.
TopFrame
LeftFrame
ContentFrame
LeftFrame loads contents related to each logged in user. The contents are loaded from SQL Server 2000 database.
But there occurs a strange problem when one user logs out and another logs in. The...
Hi folks,
From MSDN about the differences between Adding or Inserting an item the ASP.NET Cache:
Note: The Add and Insert methods have
the same signature, but there are
subtle differences between them.
First, calling the Add method returns an object that represents the
cached item, while calling Insert does
not. Second, th...
Hi Folks,
I'm looking for a good caching strategy for an CRM App written in ASP.NET. Almost all sites depend heavily on the database, which means caching parts/the whole page for some time does not work in my situation. Is there any other way you use caching in these situations?
Thanks very much,
Steve
...
Hi!
We are running JBoss with Hibernate and are having this issue.
When a session bean uses an EntityManager to find an entity, it may already exist in the EntityManager's cache and it's state may be already outdated. If the code uses such an entity to make decisions, it may make wrong decisions that would produce bugs.
Here is an exa...
Is there a way to programmatically invalidate portions of the ASP.NET MVC output cache? What I would like to be able to do is, if a user posts data that changes what would be returned from a cached action, be able to invalidate that cached data.
Is this even possible?
Thanks,
Matthew
...
I've configure a few of my objects to be cacheable ( on the mapping file) and from what I can see for this particular object the cache is not working so well.
For other objects I see the hit count increasing on each iteration, but the missed count as 0, whereas for this one I see it misses every single time for the session.
Elements i...
I have a key/value pairs mapped by hash (ID) in Dictionary<string, Dictionary<string, string>> called id2key_value. You can think of this as a way to represent database-like table with rows.
I added some helper functions to ease the use of some basic datatypes by doing a cast, like
public int GetInt(string id, string key)
{
int val...
I have a root UIViewController subclass that has a UITabBar, (I'm not using UITabBarController) and 5 tab bar items for 5 view controllers. Each view controller has a UIPickerView. Only one view controller is ever instantiated at a time -- when a tab bar item is selected, the current one is removed, the new one is instantiated and added,...