cache.clear('name'): fix a small GC race

Thanks to Marek for noticing it.
25 jobs for <span class="ref-name">cache-clear-nitpicks</span> in 46 minutes and 50 seconds (queued for 6 seconds)
Status Job ID Name Coverage
  Build
passed #187744
docker linux amd64
build:clang:linux:amd64

00:00:44

passed #187743
docker linux amd64
build:linux:amd64

00:00:47

passed #187745
docker linux amd64 allowed to fail
srpm

00:00:25

 
  Test
passed #187752
docker linux amd64
deckard:linux:amd64

00:01:23

passed #187757
privileged
distro:epel-7

00:01:45

passed #187756
privileged
distro:fedora-29

00:02:35

passed #187751
docker
doc

00:00:49

passed #187750
docker linux amd64
installcheck:linux:amd64

00:01:06

passed #187753
docker linux amd64
installcheck:valgrind:linux:amd64

00:01:48

passed #187747
docker
lint:c

00:02:25

failed #187748
docker allowed to fail
lint:clang-scan-build

00:01:19

passed #187746
docker
lint:lua

00:00:36

passed #187755
docker linux amd64
respdiff:iter:udp:linux:amd64

00:02:22

passed #187749
docker linux amd64
test:linux:amd64

00:01:06

passed #187754
docker linux amd64
test:linux:amd64:valgrind

00:01:19

 
  Respdiff
passed #187758
respdiff
respdiff:fwd-tls6-kresd.udp6

00:26:49

passed #187759
respdiff
respdiff:fwd-udp6-kresd.udp6

00:23:51

passed #187763
respdiff
respdiff:fwd-udp6-unbound.tcp6

00:33:25

passed #187764
respdiff
respdiff:fwd-udp6-unbound.tls6

00:37:51

passed #187762
respdiff
respdiff:fwd-udp6-unbound.udp6

00:43:22

passed #187761
respdiff
respdiff:iter.tls6

00:33:26

passed #187760
respdiff
respdiff:iter.udp6

00:33:26

passed #187765
respdiff
resperf:fwd-tls6.udp-asan

00:39:48

passed #187766
respdiff
resperf:fwd-udp6.udp-asan

00:38:48

passed #187767
respdiff
resperf:iter.udp-asan

00:36:17

 
Name Stage Failure
failed
lint:clang-scan-build Test
  CCLD	modules/hints/hints.so
CCLD modules/stats/stats.so
CCLD modules/bogus_log/bogus_log.so
scan-build: 32 bugs found.
scan-build: Run 'scan-view /builds/knot/knot-resolver/scan-results/2018-10-31-143111-17-1' to examine bug reports.
Uploading artifacts...
scan-results: found 37 matching files
Uploading artifacts to coordinator... ok id=187748 responseStatus=201 Created token=d5xnYo4G
ERROR: Job failed: exit code 1