PHP Classes

File: api/revertToIndex.php

Recommend this page to a friend!
  Packages of Dwight José Trujillo Barco   Time Travel Cache   api/revertToIndex.php   Download  
File: api/revertToIndex.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: 294 bytes
 

Contents

Class file image Download
?<?php
require_once '../src/TimeTravelCache.php';
$data = json_decode(file_get_contents('php://input'), true);
$cache = new TimeTravelCache();
$success = $cache->revertToIndex($data['key'], $data['index']);
header('Content-Type: application/json');
echo
json_encode(['success' => $success]);