[typo] Question about sidebar / cacheing / rails
William A. Carrel
william.a at carrel.org
Wed Nov 30 16:47:52 EST 2005
-----BEGIN PGP SIGNED MESSAGE-----
On Nov 29, 2005, at 6:12 PM, David Richardson wrote:
> A complete page is the smallest cache fragment Typo knows about.
> Sameas a Movable Type site. This was a Typo design decision, rather
> than aRails one.
> Not flexible, and not as fast as a page-component RAM cache,
> buteasier to implement. An alternate caching mechanism is in
> thedevelopment area for comment, as well as a patch to include
> I don't understand where the pages are cached, though. Typo seems
> tobe unusually sensitive to configuration, and I wonder if the
> cachingmechanism contributes to these problems.
I've just uploaded a new version of the XPATCH on #345. Now you
don't need to change your theme for proper operation. When using
this patch, the sidebar content for all the pages is cached and
pulled from public/sidebar/sidebar_content.html.
I must disagree about "not as fast" as page component caching. The
overhead of having to hit Rails for every page view (for component
cache) is huge when compared to lighttpd or Apache MPM-worker serving
up HTML pages. To me, on my website, it is not such a big deal. But
on a site that sees a lot more traffic, it could get pretty painful.
When Scott was testing it was an order of magnitude slower to do
component cache than page cache (IIRC).
I use the patch for #345 for carrel.org and have a cron job that
blows away the sidebar_content.html file every hour or so to make
sure it stays fresh. This also guarantees that the sidebar view
remains consistent across all the pages. If I was using my thinking
cap I could have the sidebar reusable on the non-Typo pages as well
The new patch is "indep-sidebar-caching.6.patch"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)
-----END PGP SIGNATURE-----
More information about the Typo-list