+ private $active;
+
+ /**
+ * Constructor checks if it's safe to use the in-process cache.
+ * On CLI scripts, we'll disable ourselves to avoid data corruption
+ * due to keeping stale data around.
+ *
+ * On web requests we'll roll the dice; they're short-lived so have
+ * less chance of stale data. Race conditions are still possible,
+ * so beware!
+ */
+ function __construct()
+ {
+ parent::__construct();
+ $this->active = (PHP_SAPI != 'cli');
+ }