# Slim 3 - Route Caching

**URL:** <https://discourse.slimframework.com/t/slim-3-route-caching/494>\
**Category:** Questions\
**Created:** [July 11, 2016, 10:57pm UTC](https://discourse.slimframework.com/t/slim-3-route-caching/494 "2016-07-11T22:57:12Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Susanth.Com](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/susanth.com/32/193_2.png) [@Susanth.Com](https://discourse.slimframework.com/u/Susanth.Com)\
**Post date:** [August 16, 2016, 12:53pm UTC](https://discourse.slimframework.com/t/slim-3-route-caching/494/4 "2016-08-16T12:53:55Z")

</div>

To QUICKLY view performance difference, with and without caching : integrate [Tracy - PHP debugger](https://github.com/nette/tracy).

- The entire site is [interactive, try it](https://nette.github.io/tracy/tracy-exception.html).
- Tracy bar shows execution time.
- Explore by fetching random routes with and without cache.
- Delete the cache file to start fresh.

###Tracy debugger stopwatch  
_( copy paste from github project page )_

**Another useful tool is the debugger stopwatch with a precision of microseconds:**

```php
Debugger::timer();

// sweet dreams my cherrie
sleep(2);

$elapsed = Debugger::timer();
// $elapsed = 2

```

**Multiple measurements at once can be achieved by an optional parameter.**

```php
Debugger::timer('page-generating');
// some code

Debugger::timer('rss-generating');
// some code

$rssElapsed = Debugger::timer('rss-generating');
$pageElapsed = Debugger::timer('page-generating');
Debugger::timer(); // runs the timer

... // some time consuming operation

echo Debugger::timer(); // elapsed time in seconds

Debugger::timer();

```

[More about debugger for slim3](http://discourse.slimframework.com/t/debugbar-for-slim3/158)

---

_[View the full topic](https://discourse.slimframework.com/t/slim-3-route-caching/494)._
