Created
March 18, 2012 00:12
-
-
Save sbisbee/2066902 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$response = new StdClass(); | |
$response->body = new StdClass(); | |
$response->body->foo = "bar"; | |
$response->headers = new StdClass(); | |
$response->headers->Etag = "\"asdfasfsadfsadf\""; | |
$cache = new SagMemoryCache(); | |
sample(); | |
for($i = 1; $i <= 100000; $i++) | |
$cache->set("$i", $response); | |
sample(); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sag->setCache(new SagMemoryCache()); | |
$response = $sag->get($url); | |
$response->body->name= "Joe"; //shouldn't update cached response | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment