private function hashCallable($callable)
    {
        $result = '';
        if (is_string($callable)) {
            $result = $callable;
        } else if (is_array($callable)) {
            $callableEntity = array_shift($callable);
            $result = is_object($callableEntity) ? get_class($callableEntity) : serialize($callableEntity);
            $result .= serialize($callable[0]);
        } else if ($callable instanceof \Closure) {
            $serializer = new Serializer();
            return $serializer->serialize($callable);
        } else if (is_object($callable)) {
            $result = serialize($callable);
        }
        return md5($result);
    }