original_string: public function delete_lock_instance($name) {
          if (!array_key_exists($name, $this->configlocks)) {
              throw new cache_exception('The requested store does not exist.');
          }
          if ($this->configlocks[$name]['default']) {
              throw new cache_exception('You can not delete the default lock.');
          }
          foreach ($this->configstores as $store) {
              if (isset($store['lock']) && $store['lock'] === $name) {
                  throw new cache_exception('You cannot delete a cache lock that is being used by a store.');
              }
          }
          unset($this->configlocks[$name]);
          $this->config_save();
          return true;
      }
code: public function delete_lock_instance($name) {
          if (!array_key_exists($name, $this->configlocks)) {
              throw new cache_exception('The requested store does not exist.');
          }
          if ($this->configlocks[$name]['default']) {
              throw new cache_exception('You can not delete the default lock.');
          }
          foreach ($this->configstores as $store) {
              if (isset($store['lock']) && $store['lock'] === $name) {
                  throw new cache_exception('You cannot delete a cache lock that is being used by a store.');
              }
          }
          unset($this->configlocks[$name]);
          $this->config_save();
          return true;
      }
code_tokens: public function delete_lock_instance ( $ name ) { if ( ! array_key_exists ( $ name , $ this -> configlocks ) ) { throw new cache_exception ( 'The requested store does not exist.' ) ; } if ( $ this -> configlocks [ $ name ] [ 'default' ] ) { throw new cache_exception ( 'You can not delete the default lock.' ) ; } foreach ( $ this -> configstores as $ store ) { if ( isset ( $ store [ 'lock' ] ) && $ store [ 'lock' ] === $ name ) { throw new cache_exception ( 'You cannot delete a cache lock that is being used by a store.' ) ; } } unset ( $ this -> configlocks [ $ name ] ) ; $ this -> config_save ( ) ; return true ; }
docstring: Deletes a lock instance given its name.
  
  @param string $name The name of the plugin, PARAM_ALPHANUMEXT.
  @return bool
  @throws cache_exception
docstring_tokens: Deletes a lock instance given its name .