From 462651d59d731cd9f7e7a7dda4165ec12e717f27 Mon Sep 17 00:00:00 2001
From: Will Rossiter <will.rossiter@gmail.com>
Date: Fri, 24 May 2013 18:21:51 +1200
Subject: [PATCH] FIX: Restore missing getMetadata from
 silverstripe-cms/f9504e. (Fixes #16)

---
 code/extensions/StaticPublisher.php | 22 +++++++++++++++++++++-
 tasks/RebuildStaticCacheTask.php    |  2 +-
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/code/extensions/StaticPublisher.php b/code/extensions/StaticPublisher.php
index f7c92bf..7c09db5 100644
--- a/code/extensions/StaticPublisher.php
+++ b/code/extensions/StaticPublisher.php
@@ -28,8 +28,17 @@ abstract class StaticPublisher extends DataExtension {
 	 *
 	 * @var string
 	 */
-	protected static $static_publisher_theme=false;
+	protected static $static_publisher_theme = false;
 	
+	/**
+	 * @var boolean includes a timestamp at the bottom of the generated HTML 
+	 * of each file, which can be useful for debugging issues with stale 
+	 * caches etc.
+	 *
+	 * @config
+	 */
+	private static $include_caching_metadata = false;
+
 	/**
 	 * @param array
 	 */
@@ -175,4 +184,15 @@ abstract class StaticPublisher extends DataExtension {
 		
 		return $urls;		
 	}
+
+	/**
+	 * @param string $url
+	 *
+	 * @return array
+	 */
+	public function getMetadata($url) {
+		return array(
+			'Cache generated on ' . date('Y-m-d H:i:s T (O)')
+		);
+	}
 }
\ No newline at end of file
diff --git a/tasks/RebuildStaticCacheTask.php b/tasks/RebuildStaticCacheTask.php
index 5370ff8..c7f4005 100644
--- a/tasks/RebuildStaticCacheTask.php
+++ b/tasks/RebuildStaticCacheTask.php
@@ -110,6 +110,6 @@ class RebuildStaticCacheTask extends BuildTask {
 			unlink($cacheBaseDir.'/lock');
 		}
 		
-		echo "\n\n== Done! ==";
+		echo "\n\n== Done! ==\n";
 	}
 }