From 6d35e42106bf8660b88bd0a1d6a3c4d8484e58be Mon Sep 17 00:00:00 2001 From: Netkas Date: Thu, 15 Dec 2022 17:48:03 -0500 Subject: [PATCH] Added \ncc\Objects > HttpResponseCache --- src/ncc/Objects/HttpResponseCache.php | 56 +++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/ncc/Objects/HttpResponseCache.php diff --git a/src/ncc/Objects/HttpResponseCache.php b/src/ncc/Objects/HttpResponseCache.php new file mode 100644 index 0000000..dde55ce --- /dev/null +++ b/src/ncc/Objects/HttpResponseCache.php @@ -0,0 +1,56 @@ +httpResponse = $httpResponse; + $this->ttl = $ttl; + } + + /** + * Returns the cached response + * + * @return HttpResponse + */ + public function getHttpResponse(): HttpResponse + { + return $this->httpResponse; + } + + /** + * Returns the Unix Timestamp of when the cache becomes invalid + * + * @return int + */ + public function getTtl(): int + { + return $this->ttl; + } + } \ No newline at end of file