From 34198e71d320fe013993abff870986eafb6aa8bc Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 23 Jan 2013 20:50:54 -0500 Subject: Add a cache buster to all data_rest urls, add caching headers to all data_rest responses, and check cache validity. Fixes #1909. --- modules/gallery/tests/Data_Rest_Helper_Test.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'modules/gallery/tests/Data_Rest_Helper_Test.php') diff --git a/modules/gallery/tests/Data_Rest_Helper_Test.php b/modules/gallery/tests/Data_Rest_Helper_Test.php index 69d17997..e6a94864 100644 --- a/modules/gallery/tests/Data_Rest_Helper_Test.php +++ b/modules/gallery/tests/Data_Rest_Helper_Test.php @@ -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")); + } } + -- cgit v1.2.3