Feb 132007
 

I have written much about caching. FreshPorts has over 500,000 pages. Only a handful of those pages are static, the rest are generated from the database. Sometimes it takes a while to generate that page. To reduce the load on the server and make the website snappier for the user, page contents are cached to disk. This works well.

The existing caching structure looks like this:

[dan@nyi:/usr/websites/freshports.org/dynamic/caching/cache/ports/misc] $ ls
bibletime.Detail.PageSize100.PageNum1.html
esniper.Detail.PageSize100.PageNum1.html
gkrellmbgchg2.Detail.PageSize100.PageNum1.html
screen.Detail.PageSize100.PageNum1.html
uf-view.Detail.PageSize100.PageNum1.html
[dan@nyi:/usr/websites/freshports.org/dynamic/caching/cache/ports/misc] $

In short, those are 5 ports. The caching allows for user-specified number of commits per page.

I’m proposing to introduce one more layer. In which case, the above becomes:

[dan@nyi:/usr/websites/freshports.org/dynamic/caching/cache/ports/misc] $ ls
bibletime
esniper
gkrellmbgchg2
screen
uf-view
[dan@nyi:/usr/websites/freshports.org/dynamic/caching/cache/ports/misc] $

And inside one of those directories would be:

Detail.PageSize100.PageNum1.html

Why do that, for just a handful of files. FreshPorts lists not just ports, but all the files within a port. For example:

[dan@nyi:/usr/ports/sysutils/bacula-server] $ find .
.
./Makefile
./distinfo
./pkg-deinstall
./pkg-deinstall.client
./pkg-descr
./pkg-install
./pkg-install.client
./pkg-plist
./pkg-plist.client
./files
./files/bacula-barcodes
./files/bacula-dir.in
./files/bacula-fd.in
./files/bacula-sd.in
./files/chio-bacula
./files/patch-scripts-Makefile.in
./files/patch-src-console-Makefile.in
./files/pkg-message.client.in
./files/pkg-message.server.in
./files/eotmodel-src-stored-dev.c.patch
[dan@nyi:/usr/ports/sysutils/bacula-server] $

Yes, I want to cache the above files too….

So this is why I want to move to . This should be interesting and relatively straight forward to do.

Please feel free to quote me on that.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive