| 1 | package MojoX::Plugin::AnyCache::Backend::Nop; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use Mojo::Base 'MojoX::Plugin::AnyCache::Backend'; | ||
| 6 | |||
| 7 | has 'support_async' => sub { 1 }; | ||
| 8 | |||
| 9 | sub get { | ||
| 10 | my ($cb, $self) = (pop, shift); | ||
| 11 | $cb->(); | ||
| 12 | } | ||
| 13 | |||
| 14 | sub set { | ||
| 15 | my ($cb, $self, $key, $value, $ttl) = (pop, shift, shift, shift, shift); | ||
| 16 | $cb->(); | ||
| 17 | } | ||
| 18 | |||
| 19 | sub incr { | ||
| 20 | my ($cb, $self) = (pop, shift); | ||
| 21 | $cb->(); | ||
| 22 | } | ||
| 23 | |||
| 24 | sub decr { | ||
| 25 | my ($cb, $self) = (pop, shift); | ||
| 26 | $cb->(); | ||
| 27 | } | ||
| 28 | |||
| 29 | sub del { | ||
| 30 | my ($cb, $self) = (pop, shift); | ||
| 31 | $cb->(); | ||
| 32 | } | ||
| 33 | |||
| 34 | sub ttl { | ||
| 35 | my ($cb, $self, $key) = (pop, shift, shift); | ||
| 36 | $cb->(time); | ||
| 37 | } | ||
| 38 | |||
| 39 | 1; |