Add a cache buster to all data_rest urls, add caching headers to all

data_rest responses, and check cache validity.  Fixes #1909.
This commit is contained in:
Bharat Mediratta
2013-01-23 20:50:54 -05:00
parent 7f0a844794
commit 34198e71d3
2 changed files with 32 additions and 2 deletions

View File

@@ -99,4 +99,13 @@ class Data_Rest_Helper_Test extends Gallery_Unit_Test_Case {
// pass
}
}
public function cache_buster_test() {
$photo = test::random_photo();
$this->assert_same(
url::abs_site("rest/data/{$photo->id}?size=thumb&m=" . filemtime($photo->thumb_path())),
data_rest::url($photo, "thumb"));
}
}