PHP Classes

File: api/history.php

Recommend this page to a friend!
  Packages of Dwight José Trujillo Barco   Time Travel Cache   api/history.php   Download  
File: api/history.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: 218 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(['history' => $cache->getHistory($key) ?? []]);