Skip to content

Commit

Permalink
move cache_reset file to cache/{env}/cache_reset
Browse files Browse the repository at this point in the history
  • Loading branch information
ahilles107 committed Jan 14, 2016
1 parent d52b3b5 commit 6876303
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions newscoop/application/modules/admin/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ protected function _initNewscoop()
}, error_reporting());
}

if (file_exists($Campsite['HTML_DIR'] . '/reset_cache')) {
$resetCachePath = Zend_Registry::get('container')->getParameter('kernel.cache_dir').'/reset_cache';
if (file_exists($resetCachePath)) {
CampCache::singleton()->clear('user');
unlink($GLOBALS['g_campsiteDir'] . '/reset_cache');
unlink($resetCachePath);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
namespace Newscoop\Tools\Console\Command;

use Symfony\Component\Console;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;

/**
* Update Image Storage Command
*/
class AutopublishCommand extends Console\Command\Command
class AutopublishCommand extends ContainerAwareCommand
{
/**
* @see Console\Command\Command
Expand All @@ -32,9 +33,8 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
{
$issueActions = \IssuePublish::DoPendingActions();
$articleActions = \ArticlePublish::DoPendingActions();

if ($issueActions > 0 || $articleActions > 0) {
fopen(realpath(APPLICATION_PATH . '/../') .'/reset_cache', 'w');
fopen($this->getContainer()->getParameter('kernel.cache_dir') .'/reset_cache', 'w');
}

if ($input->getOption('verbose')) {
Expand Down

0 comments on commit 6876303

Please sign in to comment.