/** * Hashes a key by multi-tenant name to prevent cross-tenant cache retrieval. Does not hash if this is not a * multi-tenanted application, or if the key begins with --shared--. * * @param string $key * @return string */ protected static function _multiTenantKey($key) { $tenant = Zrt_Application::getTenantName(); if ($tenant && '--shared--' != substr($key, 0, 10)) { $key = md5($tenant . $key); } return $key; }
public static function isShared() { return self::$_shared; return !self::$_shared && Zrt_Application::getTenantName() ? false : true; }