1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- define('INSTALLDIR', dirname(__DIR__));
- define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
- $shortoptions = 'd';
- $longoptions = array('delete');
- $helptext = <<<END_OF_FLUSHSITE_HELP
- flushsite.php -s<sitename>
- Flush the site with the given name from memcached.
- END_OF_FLUSHSITE_HELP;
- require_once INSTALLDIR.'/scripts/commandline.inc';
- $nickname = common_config('site', 'nickname');
- $sn = Status_network::memGet('nickname', $nickname);
- if (empty($sn)) {
- print "No such site.\n";
- exit(-1);
- }
- print "Flushing cache for {$nickname}...";
- $sn->decache();
- print "OK.\n";
|