summaryrefslogtreecommitdiffstats
path: root/lib/Devscripts/Salsa/purge_cache.pm
blob: 187f698d9ee0353f28cccf513e38fa2c85b8b9c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Empties the Devscripts::JSONCache
package Devscripts::Salsa::purge_cache;

use strict;
use Devscripts::Output;
use Moo::Role;

sub purge_cache {
    my @keys = keys %{ $_[0]->_cache };
    delete $_[0]->_cache->{$_} foreach (@keys);
    ds_verbose "Cache empty";
    return 0;
}

1;