js/plugins/drupalentity/plugin.js | 3 --- src/Controller/PreviewController.php | 2 +- tests/src/FunctionalJavascript/MediaImageTest.php | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/js/plugins/drupalentity/plugin.js b/js/plugins/drupalentity/plugin.js index a96d331..662c9ff 100644 --- a/js/plugins/drupalentity/plugin.js +++ b/js/plugins/drupalentity/plugin.js @@ -295,9 +295,6 @@ /** * Loads an entity embed preview, calls a callback to insert. * - * @todo Since previews use the downcasted representation, and `downcast()` relies 100% on `this.data`, and - * `_hashData()` knows which changes are immaterial, we should be able to cache preview responses. - * * @param {function} callback * A callback function that will be called after the preview has loaded, and receives the widget instance. */ diff --git a/src/Controller/PreviewController.php b/src/Controller/PreviewController.php index 428c0d8..33102d9 100644 --- a/src/Controller/PreviewController.php +++ b/src/Controller/PreviewController.php @@ -78,7 +78,7 @@ class PreviewController implements ContainerInjectionInterface { // - \Drupal\Core\Cache\CacheableResponse because caching it on the server // side is wasteful, hence there is no need for cacheability metadata. // - \Drupal\Core\Render\HtmlResponse because there is no need for - // attachments nor cacheability metadata. + // attachments nor cacheability metadata. return (new Response($html)) // Do not allow any intermediary to cache the response, only the end user. ->setPrivate() diff --git a/tests/src/FunctionalJavascript/MediaImageTest.php b/tests/src/FunctionalJavascript/MediaImageTest.php index 3c30a21..037532f 100644 --- a/tests/src/FunctionalJavascript/MediaImageTest.php +++ b/tests/src/FunctionalJavascript/MediaImageTest.php @@ -764,8 +764,6 @@ class MediaImageTest extends EntityEmbedTestBase { return entry.initiatorType == 'xmlhttprequest' && entry.name.indexOf('/entity-embed/preview/') !== -1; }) .pop() - // // .length; - // // .name; .transferSize; })() JS;