Code Duplication    Length = 8-9 lines in 2 locations

lib/includes/loader.web.php 2 locations

@@ 717-724 (lines=8) @@
714
				// as an object clears the cache upon a save.
715
716
				// Send the original headers - they will already contain the correct max-age and expires values;
717
				if (file_exists($cachedheader)) {
718
					$filedata = file($cachedheader);
719
					if (is_array($filedata)) {
720
						while (list($key, $header)=each($filedata)) {
721
							ldHeader($header);
722
						}
723
					}
724
				}
725
				header("X-Ariadne-Cache: Hit");
726
				ldHeader("HTTP/1.1 304 Not Modified");
727
			} else {
@@ 728-736 (lines=9) @@
725
				header("X-Ariadne-Cache: Hit");
726
				ldHeader("HTTP/1.1 304 Not Modified");
727
			} else {
728
				if (file_exists($cachedheader)) {
729
					// Cache header file also contains information about Cache-control;
730
					$filedata = file($cachedheader);
731
					if (is_array($filedata)) {
732
						while (list($key, $header)=each($filedata)) {
733
							ldHeader($header);
734
						}
735
					}
736
				}
737
				header("X-Ariadne-Cache: Hit"); // Send this after the cached headers to overwrite the cached cache-miss header;
738
739
				if ($AR->ESI) {