PHP Classes

File: api/get.php

Recommend this page to a friend!
  Packages of Dwight José Trujillo Barco   Time Travel Cache   api/get.php   Download  
File: api/get.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Time Travel Cache
Store multiple versions of values in cache files
Author: By
Last change:
Date: 2 months ago
Size: 203 bytes
 

Contents

Class file image Download
?<?php
require_once '../src/TimeTravelCache.php';
$cache = new TimeTravelCache();
$key = $_GET['key'] ?? '';
header('Content-Type: application/json');
echo
json_encode(['value' => $cache->get($key)]);