I noticed that thumbnails were not being cached from photo-album and
tracked it down to the call in cr_write_content which calls ns_cpfp
to return the filesystem file. If I change cr_write_content to look
like
switch $storage_type {
text {
ReturnHeaders $mime_type
ns_write [db_string write_text_content ""]
}
file {
set path [cr_fs_path $storage_area_key]
set filename [db_string write_file_content ""]
ns_returnfile 200 $mime_type $filename
}
lob {
ReturnHeaders $mime_type
db_write_blob write_lob_content ""
}
}
and I now get 304s for unchanged files. This is not 100% safe since
the revision file
timestamp is not necessarily the timestamp you should use for the item
but it seems like we should make cr_write_content pay attention to
if-modified-since headers and I think it should be pretty
straightforward to do so. Does anyone have any objection?