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
mtymek / CachingMiddleware.php
Last active Aug 30, 2015
CachingMiddleware
View CachingMiddleware.php
<?php
class CachingMiddleware
{
protected $cacheDir = 'data/cache/pages';
protected function getCacheFile(RequestInterface $request)
{
$uri = $request->getUri();
return 'cached-'
@mtymek
mtymek / Benchmark for isValid
Last active Aug 29, 2015
HeaderSecurity benchmark
View Benchmark for isValid
<?php
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.