From 3625b2553d090c753e5a7f73ab4bb4f71b5f7f8c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 14 Jun 2018 13:31:25 +1200 Subject: [PATCH] List deprecated APIs in changelog --- .../08_Performance/02_HTTP_Cache_Headers.md | 4 ++-- docs/en/04_Changelogs/4.2.0.md | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/en/02_Developer_Guides/08_Performance/02_HTTP_Cache_Headers.md b/docs/en/02_Developer_Guides/08_Performance/02_HTTP_Cache_Headers.md index 227696ae0..d1274d7c6 100644 --- a/docs/en/02_Developer_Guides/08_Performance/02_HTTP_Cache_Headers.md +++ b/docs/en/02_Developer_Guides/08_Performance/02_HTTP_Cache_Headers.md @@ -21,8 +21,8 @@ are a great way to learn about HTTP caching. In order to support developers in making safe choices around HTTP caching, we're using a `HTTPCacheControlMiddleware` class to control if a response -should be considered public or private. This is an abstraction on existing -lowlevel APIs like `HTTP::add_cache_headers()` and `HTTPResponse->addHeader()`. +should be considered public or private. This is an abstraction on the +`HTTPResponse->addHeader()` lowlevel API. The `HTTPCacheControlMiddleware` API makes it easier to express your caching preferences without running the risk of overriding essential core safety measures. diff --git a/docs/en/04_Changelogs/4.2.0.md b/docs/en/04_Changelogs/4.2.0.md index f942dea09..b63fea5b1 100644 --- a/docs/en/04_Changelogs/4.2.0.md +++ b/docs/en/04_Changelogs/4.2.0.md @@ -207,9 +207,9 @@ SilverStripe\Core\Injector\Injector: #### Overview In order to support developers in making safe choices around HTTP caching, -we've introduced a `HTTPCacheControlMiddleware` class to control if a response -should be considered public or private. This is an abstraction on existing -lowlevel APIs like `HTTP::add_cache_headers()` and `HTTPResponse->addHeader()`. +we're using a `HTTPCacheControlMiddleware` class to control if a response +should be considered public or private. This is an abstraction on the +`HTTPResponse->addHeader()` lowlevel API. This change introduces smaller but necessary changes to HTTP caching headers sent by SilverStripe. If you are relying on HTTP caching in your implementation, @@ -344,7 +344,7 @@ class PageController extends ContentController } ``` -#### Detailed Cache-Control Changes: +#### Detailed Cache-Control Changes * Added `Cache-Control: no-store` header to default responses, to prevent intermediary HTTP proxies (e.g. CDNs) from caching unless developers opt-in @@ -360,4 +360,11 @@ class PageController extends ContentController * DataObject no longer automatically invokes `HTTP::register_modification_date` with LastModified on construction. User code should instead invoke `HTTPCacheControlMiddleware::singleton()->registerModificationDate()` explicitly. - + * Deprecated `HTTP::add_cache_headers()`. Headers are added automatically by `HTTPCacheControlMiddleware` instead. + * Deprecated `HTTP::set_cache_age()`. Use `HTTPCacheControlMiddleware::singleton()->setMaxAge($age)` + * Deprecated `HTTP.cache_ajax_requests`. Use `HTTPCacheControlMiddleware::disableCache()` instead + * Deprecated `HTTP.modification_date`. Handled by `HTTPCacheControlMiddleware` + * Deprecated `HTTP.disable_http_cache`. Use `HTTPCacheControlMiddleware.defaultState` and `defaultForcingLevel` instead + * Deprecated `HTTP::register_modification_date()`. Use `HTTPCacheControlMiddleware::registerModificationDate()` instead + * Deprecated `HTTP::register_modification_timestamp()`. Use `HTTPCacheControlMiddleware::registerModificationDate()` instead + * Deprecated `HTTP::register_etag()`. Use `HTTPCacheControlMiddleware::ETagMiddleware()` instead \ No newline at end of file