From dde73926d0352b4790012c9923e624be12e75a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Costa=20Silva?= <1574795+joaocsilva@users.noreply.github.com> Date: Thu, 17 Feb 2022 17:04:12 +0100 Subject: [PATCH] NEPT-2975: Prevent purge for File --- nexteuropa_varnish.module | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nexteuropa_varnish.module b/nexteuropa_varnish.module index 8fd137f..d4e2544 100644 --- a/nexteuropa_varnish.module +++ b/nexteuropa_varnish.module @@ -950,6 +950,10 @@ function _nexteuropa_varnish_trim_base_path($path, $base_path = NULL) { * The file entity. */ function _nexteuropa_varnish_flush_file(&$file) { + if (_nexteuropa_varnish_prevent_purge()) { + return; + } + $scheme = file_uri_scheme($file->uri); $base_name = drupal_basename($file->uri);