/**
  * @group ZF-7058
  */
 public function testSetCacheFromCacheManager()
 {
     $configCache = array('memory' => array('frontend' => array('name' => 'Core', 'options' => array('lifetime' => 120, 'automatic_serialization' => true)), 'backend' => array('name' => 'Black Hole')));
     $this->bootstrap->registerPluginResource('cachemanager', $configCache);
     $this->assertFalse(Zend_Locale::hasCache());
     $config = array('bootstrap' => $this->bootstrap, 'cache' => 'memory');
     $resource = new Zend_Application_Resource_Locale($config);
     $resource->init();
     $this->assertTrue(Zend_Locale::hasCache());
     Zend_Locale::removeCache();
 }
 public function run()
 {
     $form = $this->getForm();
     if (!$form->isSubmitted()) {
         // nop
     } elseif ($form->validate()) {
         $error = $this->grid->getDataSource()->getTDataSource()->createTranslation($this->grid->getCompleteRequest()->getParam('new_language'));
         if ($error) {
             $form->setError($error);
         } else {
             Zend_Locale::hasCache() && Zend_Locale::clearCache();
             Zend_Translate::hasCache() && Zend_Translate::clearCache();
             Am_Di::getInstance()->cache->clean();
             $this->grid->redirectBack();
         }
     }
     echo $this->renderTitle();
     echo $form;
 }