From f53ea2cee9551682647495a9b46bee67fe4b8894 Mon Sep 17 00:00:00 2001
From: Andrew Berry <deviantintegral@gmail.com>
Date: Fri, 2 Dec 2011 16:12:20 -0500
Subject: [PATCH] Issue #1349694: Add default options to cache_graceful().

---
 cache_graceful.module |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/cache_graceful.module b/cache_graceful.module
index 47c992c..a3d6827 100755
--- a/cache_graceful.module
+++ b/cache_graceful.module
@@ -178,6 +178,11 @@ function cache_graceful_options($callback = NULL, $options = NULL) {
  * @see cache_get()
  */
 function cache_graceful($key, $args, $table = 'cache', $expire = NULL, $prefetch = NULL, $options = array()) {
+  $defaults = array(
+    'ensure_result' => TRUE,
+  );
+  $options = array_merge($defaults, $options);
+
   if (empty($expire) && (string)$expire !== '0') {
     $expire = variable_get('cache_graceful_expire', CACHE_GRACEFUL_EXPIRE);
   }
-- 
1.7.7.2

