|
Lines 160-165
sub startup {
Link Here
|
| 160 |
$self->plugin('Koha::REST::Plugin::Responses'); |
160 |
$self->plugin('Koha::REST::Plugin::Responses'); |
| 161 |
$self->plugin('Koha::REST::Plugin::Auth::IdP'); |
161 |
$self->plugin('Koha::REST::Plugin::Auth::IdP'); |
| 162 |
$self->plugin( 'Mojolicious::Plugin::OAuth2' => $oauth_configuration ); |
162 |
$self->plugin( 'Mojolicious::Plugin::OAuth2' => $oauth_configuration ); |
|
|
163 |
|
| 164 |
$self->routes->get( |
| 165 |
'/memlite-counter' => sub { |
| 166 |
my $c = shift; |
| 167 |
require Koha::Cache::Memory::Lite; |
| 168 |
my $cache = Koha::Cache::Memory::Lite->get_instance(); |
| 169 |
my $counter = $cache->get_from_cache('memlite-counter') // 0; |
| 170 |
$counter = $counter + 1; |
| 171 |
$cache->set_in_cache('memlite-counter', $counter); |
| 172 |
$c->render( text => "$counter\n" ); |
| 173 |
} |
| 174 |
); |
| 163 |
} |
175 |
} |
| 164 |
|
176 |
|
| 165 |
1; |
177 |
1; |
| 166 |
- |
|
|