Questions tagged [page-caching]
95 questions
3
votes
1 answer
enabling rails page caching causes http header charset to disappears
I need charset to be utf-8, which seem to be the case by default. Recently I enabled page caching for a few static pages:
caches_page :about
The caching works fine, and I see the corresponding about.html and contact.html pages generated in my…

tstyle
- 748
- 1
- 10
- 23
3
votes
2 answers
What part of the RAM is used by the system file cache in Windows?
According to general notions about the page cache and this answer the system file cache essentially uses all the RAM not used by any other process. This is, as far as I know, the case for the page cache in Linux.
Since the notion of "free RAM" is a…

Benoit Sanchez
- 681
- 6
- 21
3
votes
1 answer
Linux : dirty page writeback and concurrent write
Background : in Java I'm memory mapping a file (shared).
I'm writing some value at the address 0 of that file. I understand the corresponding PAGE in the PAGE CACHE is flagged as DIRTY and will be written later depending on the dirty_ratio and the…

Marc Polizzi
- 9,275
- 3
- 36
- 61
3
votes
0 answers
W3 Total Cache and User Agent Groups
We are using W3 Total Cache (Page Cache - Disk: Basic). This causes generation of same cache for desktop and mobile.
We need separate cache for mobile and desktop for which we tried to use User Agent Groups but it seems like either we have not…

mshakeel
- 604
- 6
- 21
3
votes
1 answer
W3 Total Cache - Clear page cache every hour automatic
Is it possible to clear the page cache every hour in W3 total cache? I have a dynamic website (plugin) with data that updates maybe every couple minutes so I want to clear the cache every hour so the data is something like up-to-date.
Now I dont use…

user2812779
- 193
- 3
- 19
3
votes
3 answers
How do I add page caching to my Rails app for visitors?
Say I have a Rails 4.2 site on Heroku with many Posts. When a post is viewed, the application hits the database to get the post's data and associated data from other models. Visitors (non-logged-in users) to my website should see Posts without any…

am-rails
- 1,463
- 2
- 16
- 40
3
votes
2 answers
How to configure nginx to try_files first, if not exists follow the request_uri
We have page caches with id partitioning and subdomain. Say for requests like ny.site.com/cat/12345 or la.site.com/dog/234, nginx need to
check if file /cat/ny/1234/5.html exists, return it
otherwise, just use the original request_uri to hit the…

QWJ QWJ
- 317
- 1
- 5
- 14
3
votes
1 answer
Linux Page Cache Replacement
I have two PostgreSQL databases named data-1 and data-2 that sit on the same machine. Both databases keep 40 GB of data, and the total memory available on the machine is 68GB.
I started data-1 and data-2, and ran several queries to go over all their…

metdos
- 13,411
- 17
- 77
- 120
2
votes
1 answer
Cache miss with Rails 3.2 and page caching in development - anyone else?
Using Rails 3.2 in development mode, I'm trying to test out some simple page caching.
pages_controller.rb
class PagesController < ActionController::Base
caches_page :index, :show
def index
@pages = Page.all
end
def show
@page =…

simplesessions
- 75
- 6
2
votes
1 answer
Always add MAP_NORESERVE flag in mmap for a regular file?
According to mmap's manual:
MAP_NORESERVE
Do not reserve swap space for this mapping. When swap space
is reserved, one has the guarantee that it is possible to modify
the mapping. When swap space is not reserved one might get
SIGSEGV upon a…

xmllmx
- 39,765
- 26
- 162
- 323
2
votes
0 answers
How to handle linux page cache (tag lookup) returning less pages that what was asked?
This is from a file system perspective.
The file system page size is 8K (i.e. double the block size, 4k).
So, when I dirty pages and go for a flush, I make sure that the range passed to pvec_lookup_tag() is 8k aligned at all costs. The page cache…

Sam
- 58
- 7
2
votes
0 answers
Is Linux file system layer(not the VFS) aware of page cache
In Linux file system i understand Page cache is between VFS and the file system. Want to know, at any point of time whether the file system will be aware of the pages (of a file) that are in the page cache or only VFS layer only will have this…

natrayan
- 345
- 2
- 11
2
votes
1 answer
Does reading via O_DIRECT flush dirty pages first?
Assume I have a simple program that does the following:
fdWrite = open("file", O_WRONLY);
fdRead = open("file", O_RDONLY | O_DIRECT);
writeBuffer = ;
write(fdWrite, writeBuffer);
readBuffer = read(fdRead, sizeof(writeBuffer));
Will I be…

Paul D.
- 21
- 1
2
votes
1 answer
Laravel - How to make CSRF token work with HTML Cache?
As far as i know HTML cache will generate a static html file but CSRF needs to be refreshed on each time load page so is there a way to make CSRF token work with HTML Cache?

Brooklyn
- 53
- 1
- 8
2
votes
3 answers
Are file reads served from dirtied pages in the page cache?
When bytes are written to a file, the kernel does not immediately write those bytes to disk but stores the bytes in dirtied pages in the page cache (write-back caching).
The question is if a file read is issued before the dirty pages are flushed to…

Stormshadow
- 6,769
- 9
- 33
- 34