mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-10 09:19:18 -04:00
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:
@@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user