Skip to content

Instantly share code, notes, and snippets.

Mateusz Tymek mtymek

Block or report user

Report or block mtymek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mtymek / CachingMiddleware.php
Last active Aug 30, 2015
View CachingMiddleware.php
class CachingMiddleware
protected $cacheDir = 'data/cache/pages';
protected function getCacheFile(RequestInterface $request)
$uri = $request->getUri();
return 'cached-'
mtymek / Benchmark for isValid
Last active Aug 29, 2015
HeaderSecurity benchmark
View Benchmark for isValid
include 'vendor/autoload.php';
$ts = microtime(true);
for ($i = 0; $i < 20000; $i++) {
$request = \Zend\Diactoros\ServerRequestFactory::fromGlobals();
You can’t perform that action at this time.