Questions tagged [fragment-caching]

74 questions
1
vote
2 answers

Rails fragment caching and timestamp displayed

I'm developing a social network like a mix of Twitter and Facebook based on sports. I have a model called Post (id, user_id, receiver_id, message, created_at) and I want to cache the Post views. app/views/posts/_post.haml - cache post do %div …
1
vote
1 answer

Setting the rails cache store for fragment_caching to be different

Is is possible to configure the rails fragment caching to be a file_store and have the Rails.cache object to store values using a memory store? Or are they both the same storage mechanism in the end?
matsko
  • 21,895
  • 21
  • 102
  • 144
1
vote
1 answer

Updating a cached user control in asp.net

i have a user control on my page to show the profile picture of logged in user. I have cached this user control using <%@ OutputCache Duration="120" VaryByParam="none" %>. I am facing an issue here i.e when i log out the current logged in user and…
Varun
  • 31
  • 5
0
votes
1 answer

How to expire fragment cache for objects index on object update

I'm fragment-caching this fragment: <% cache('fragment-id') do %>
<%= render @object %>
<% end %> Now, obviously, I need to expire that cache every time an object is updated (speaking from the db…
0
votes
1 answer

ruby on rails 3.1 fragment caching

I have an app and I'd like to cache some parts of the page, and I have been reading a lot about the ways to do this. I understand that fragment caching is the best way to do it on my project, but I can´t find a simple example to learn how to…
0
votes
0 answers

Will Rails Fragment Caching make any performance improvement for storing a SVG or complex html?

I have a big SVG file about 50kb, that I can't add as an external image or from the CSS (where the SVG will be cached as an ordinary image), so the SVG is inside the HTML document. This SVG exists on a lot of pages and loaded a lot of times. But I…
GEkk
  • 1,336
  • 11
  • 20
0
votes
1 answer

Fragment cache not updating key when db records changes

Using fragment cache digest to cache data. Issue I face is that when the db records changes cache key should be regenerate but it not refreshing and showing the old data. I get data in json format. cache…
Haseeb Ahmad
  • 7,914
  • 12
  • 55
  • 133
0
votes
2 answers

Page caching issue in ASP.Net

We use page output caching in our ASP.Net website home page to make it appear load faster. The caching time is very minimum(5 minutes) so that the data updations are reflected to users within short time span. In the home page itself, We have a…
banupriya
  • 1,220
  • 5
  • 21
  • 51
0
votes
0 answers

Conditional cache user control in asp.net

I have a user control and I want to cache it as long as session does not change. <%@ OutputCache Duration="18000" VaryByParam="none" VaryByCustom="changeIt" %> Now it should cache as long as Session["UserId"] does not change but when session…
Sunil Chaudhry
  • 263
  • 5
  • 22
0
votes
2 answers

Rails 5.2.1 - Model & Fragment Caching

I am trying to setup Model and Fragment Caching in Rails 5.2.1 I have had success with Fragment caching, but I am still seeing database queries after implementing model caching for my Model. I have enabled development caching $ rails…
0
votes
2 answers

Broken links when doing fragment caching in Rails

Suppose there is a blog with posts, comments and users which can comment. Users have SEO-friendly URLs such as http://localhost:3000/users/john (this can be easily done by using permalink_fu). The model uses touch to simplify caching: class Post …
Jose
  • 609
  • 1
  • 7
  • 15
0
votes
1 answer

Expire fragment caching when inner HTML has changed?

I have the following in my users.html.slim view: .header Welcome - cache ['user/details', user.last_modified] do = render 'user/details', user: @user My problem is that I have changed the user/details markup, and since the users haven't…
Hommer Smith
  • 26,772
  • 56
  • 167
  • 296
0
votes
1 answer

Rails 4 cache: How to disable default caching for particular controller action or view?

We have Rails 4.2 application running on production with the following configurations (cache related). And we have not implemented any caching technique so far (default setup). config.action_controller.perform_caching = true # Use a different cache…
Venkat Ch
  • 1,168
  • 2
  • 17
  • 37
0
votes
2 answers

Fragment Caching Using Javascript

Can someone point me to some example code on how best to do caching while loading up the dynamic parts of a page using javascript? My canonical example involves a page where nothing ever changes other than the user's logged in status and username at…
jerhinesmith
  • 15,214
  • 17
  • 62
  • 89
0
votes
0 answers

Unable to get w3 total cache page caching to work with my cookies

I have dynamic phone numbers in various parts of my website (header/footer/inner pages) that pull the correct phone number through a stored cookie. The cookies are stored by a query string that contains a unique ID (ex. wwww.mydomain.com/a/1300)…
Milkman7
  • 50
  • 9