Add special query to reset the cache
This commit is contained in:
parent
d64cadb47b
commit
6adc8c4a69
@ -38,8 +38,12 @@ class RequestDtoCache implements ValueResolverInterface
|
||||
$cacheData = $session->get($cacheKey, []);
|
||||
$queryData = $request->query->all();
|
||||
$params = $constructor->getParameters();
|
||||
$args = [];
|
||||
|
||||
if (isset($queryData['reset'])) {
|
||||
$queryData = $cacheData = [];
|
||||
}
|
||||
|
||||
$args = [];
|
||||
foreach ($params as $param) {
|
||||
$name = $param->getName();
|
||||
if (array_key_exists($name, $queryData)) {
|
||||
|
@ -28,7 +28,14 @@
|
||||
|
||||
{% block column2 %}
|
||||
<h3>Filters</h3>
|
||||
<div class="list-group">
|
||||
<a href="{{ path('snip_index', {'reset': 1}) }}"
|
||||
class="list-group-item list-group-item-action">
|
||||
<i class="fa fa-refresh"></i> Reset
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<h5>Sort by</h5>
|
||||
<div class="list-group">
|
||||
{% for sortOption in snipSortOptions() %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user