khoaofgod/phpfastcache — pull request #44 by laurent22 (2013-12-13 04:36:29+00:00)
Title: Fixed bug when using cache library in CLI mode

In command line mode, `$_SERVER['HTTP_HOST']` is not defined, however it's currently used to build the default security key.

In this change, I check if `HTTP_HOST` is defined and use `get_current_user()` as security key suffix otherwise. Using the current user means that different users running the same script won't share the same cache (which could be a problem with some applications).