private function addCacheLimiterHeaders(ResponseInterface $response):ResponseInterface
    {
        $cache = new CacheUtil();
        switch (session_cache_limiter()) {
            case 'public':
                $response = $cache->withExpires($response, time() + session_cache_limiter() * 60);
                $response = $cache->withCacheControl($response,
                    (new ResponseCacheControl())
                        ->withPublic()
                        ->withMaxAge(session_cache_limiter() * 60)
                );
                break;

            case 'private_no_expire':
                $response = $cache->withCacheControl($response,
                    (new ResponseCacheControl())
                        ->withPrivate()
                        ->withMaxAge(session_cache_limiter() * 60)
                );
                break;

            case 'private':
                $response = $cache->withExpires($response, 'Thu, 19 Nov 1981 08:52:00 GMT');
                $response = $cache->withCacheControl($response,
                    (new ResponseCacheControl())
                        ->withPrivate()
                        ->withMaxAge(session_cache_limiter() * 60)
                );
                break;

            case 'nocache':
                $response = $cache->withExpires($response, 'Thu, 19 Nov 1981 08:52:00 GMT');
                $response = $cache->withCacheControl($response,
                    (new ResponseCacheControl())
                        ->withPrivate()
                        ->withCachePrevention()
                );
                $response = $response->withHeader("Pragma", "no-cache");
                break;
        }
        return $response;
    }