fragment-caching

Fragment Caching with Memcached

Is there any way of using Memcached for fragment caching in Rails? ...

Is it possible to automatically derive the components of a cache-key in rails?

When generating cache-keys for rendered content in web applications, you have to take into account all variables that might change the result. In dynamic environments like rails these can be defined in different places: the controller, a model, the session or the server environment. And they can be referenced in the template, in a templa...

template fragment caching doesn't seem to work for some custom template tags

I've been implementing caching in my django application, and used per view caching via the cache API and template fragment caching. On some of my pages I use a custom django template tag, this tag is provided via a third party developer, it takes some arguments in its template tags, and then make a request to a remote server, gets the re...

Rails - Best way to implement Optionnal Fragment Caching for testing purposes

Hi, I'm using fragment caching a lot and it is essential to me for good performance. However, due to the complexity of the caching I'm using, I need to offer my testers, a way to disable/enable caching as a session variable. (On a user basis only) I was thinking about implementing a cache_disabled? method, and I now check for it's valu...

MVC, how to organize caching parts of page and how to be with View?

Hello, Right now I'm trying to create my own tiny MVC (just for practice and for understanding MVC pattern details). I'd like to cache parts of pages (dropdowns, lists etc.) and I don't know what is the best way to organize it. Let's imagine that I have PostsController with method getPostDetailsShortly($post_id). This method could look...

SqlCacheDependency and output cache invalidation

Hi , Suppose I have a page abc.aspx in it I have a user control ucx123.ascx. I am fragment caching the user control and the cache is vary by param. The parameter is some id in the querystring. I want to add a sql cache dependency with respect to sql query. The scenario is I added the dependency but the cache is not invalidating ...

Adding Sql Cache Dependency in User Control?

Adding Sql Cache Dependency in User Control? How to add Sql Cache Dependency when we are using fragment caching. ...

Caching a user control

I have a user control which I want to Output cache( fragment cache) and set the dependency to a query. I mean that on change or modification of data returned by that query the cache should get invalidated. I have read that in the output cache directive in the user control Sqldependency = "CommandNotification" cannot be used. So, how sh...

Getting PartialCache to vary by a property of a user control

I have a user control, which contains another user control. The code behind of the outer control looks like this: [PartialCaching(60,null,null,null,null,true)] public partial class MyControl : UserControl { public bool PropertyOne { get { return AnotherUserControl.PropertyOne; } set { AnotherUserControl.PropertyO...

Memcached and Rails Fragment Caching Issue

When I have 2 views that fragment cache the same query BUT display them differently, there is only one fragment and they both display it the same way. Is there any way around this? For example... #views/posts/list - cache(@posts) do - for p in @posts = p.title #views/posts/list_with_images - cache(@posts)...

ASP.NET MVC output cache with dynamic fragment

How could I cache an entire page except a bit at the top which says something along the lines of "Welcome back, Matt! | Log Out" if the user is logged in and so-on? I'm using ASP.NET MVC 2. ...

Rails - caching and permission based views

Hello, I use CanCan to check user permissions and display or suppress page content conditionally for my users. I want to cache my pages though, and even with fragment caching can't find an elegant solution... for example: cache do # much code if can? # little code else # little code # much code if can? # little cod...

Cannot expire cached fragment by default methods in Ruby on Rails + Devise

I'm using Devise as authenticating solution in Rails and I have a cached fragment :recent_users. I want this fragment to expire when a new user is registered, changed or removed, so I put in my(manually created) users_controller.rb class UsersController < ApplicationController cache_sweeper :user_sweeper, :only => [:create, :updat...

Optimize APC Caching

Hello, here is a link to how my APC is running : http://www.animefushigi.com/apc.php As you can see, it fills up pretty quickly and my Cache Full Count goes over 1000 sometimes My website uses Wordpress. I notice that every time I make a new post or edit a post, 2 things happen. 1) APC Memory "USED" resets 2) I get a whole lot of Fr...

Working around memcached's lack of wildcard expiration in Rails fragment caching

I'm working on adding fragment caching to a Rails 3 site that has both logged in and anonymous users, and need to control when parts of the page expire based on when content displayed throughout the site is updated. Midway into this, I discovered that memcached doesn't support regexps for expire_fragment, so now I'm looking for ways arou...

Fragment caching with Touch

Hi, Currently I am using fragment caching with an object key. And I expire the cache using Touch with updates the updated_at column and then the current cache become obsolete. And a new cache is generated the next time. <% cache do product %> The cache key for an object looks like this table_name/ID-updated_at Now I want to cache m...