Version 5.1 - All the GraphQL #32
@ -17,13 +17,13 @@
|
||||
[<a href="<?= $urlGenerator->default_url('manga') ?>">Manga List</a>]
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php /* if ($auth->is_authenticated()): ?>
|
||||
<?php if ($auth->is_authenticated()): ?>
|
||||
<span class="flex-no-wrap"> </span>
|
||||
<span class="flex-no-wrap small-font">
|
||||
<button type="button" class="js-clear-cache user-btn">Clear API Cache</button>
|
||||
</span>
|
||||
<span class="flex-no-wrap"> </span>
|
||||
<?php endif */ ?>
|
||||
<?php endif ?>
|
||||
<span class="flex-no-wrap small-font">
|
||||
<?php if ($auth->is_authenticated()): ?>
|
||||
<a class="bracketed" href="<?= $url->generate('logout') ?>">Logout</a>
|
||||
|
@ -41,6 +41,16 @@ trait CacheTrait {
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cache object if it exists
|
||||
*
|
||||
* @return Pool
|
||||
*/
|
||||
public function getCache()
|
||||
{
|
||||
return $this->cache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a hash as a cache key from the current method call
|
||||
*
|
||||
|
@ -374,7 +374,7 @@ class Controller {
|
||||
*/
|
||||
public function clearCache()
|
||||
{
|
||||
$this->cache->purge();
|
||||
$this->cache->clear();
|
||||
$this->outputHTML('blank', [
|
||||
'title' => 'Cache cleared'
|
||||
], NULL, 200);
|
||||
|
@ -159,7 +159,7 @@ class Anime extends BaseController {
|
||||
if ($result)
|
||||
{
|
||||
$this->set_flash_message('Added new anime to list', 'success');
|
||||
// $this->cache->purge();
|
||||
$this->cache->clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -233,7 +233,7 @@ class Anime extends BaseController {
|
||||
if ($full_result['statusCode'] === 200)
|
||||
{
|
||||
$this->set_flash_message("Successfully updated.", 'success');
|
||||
// $this->cache->purge();
|
||||
$this->cache->clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -261,7 +261,7 @@ class Anime extends BaseController {
|
||||
|
||||
$response = $this->model->updateLibraryItem($data);
|
||||
|
||||
// $this->cache->purge();
|
||||
$this->cache->clear();
|
||||
$this->outputJSON($response['body'], $response['statusCode']);
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ class Anime extends BaseController {
|
||||
if ((bool)$response === TRUE)
|
||||
{
|
||||
$this->set_flash_message("Successfully deleted anime.", 'success');
|
||||
// $this->cache->purge();
|
||||
$this->cache->clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -142,7 +142,7 @@ class Manga extends Controller {
|
||||
if ($result)
|
||||
{
|
||||
$this->set_flash_message('Added new manga to list', 'success');
|
||||
// $this->cache->purge();
|
||||
$this->cache->clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -203,7 +203,7 @@ class Manga extends Controller {
|
||||
if ($full_result['statusCode'] === 200)
|
||||
{
|
||||
$this->set_flash_message("Successfully updated manga.", 'success');
|
||||
// $this->cache->purge();
|
||||
$this->cache->clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -232,7 +232,7 @@ class Manga extends Controller {
|
||||
|
||||
$response = $this->model->updateLibraryItem($data);
|
||||
|
||||
// $this->cache->purge();
|
||||
$this->cache->clear();
|
||||
$this->outputJSON($response['body'], $response['statusCode']);
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ class Manga extends Controller {
|
||||
if ($response)
|
||||
{
|
||||
$this->set_flash_message("Successfully deleted manga.", 'success');
|
||||
//$this->cache->purge();
|
||||
$this->cache->clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user