title: Trying to Rails.cache.delete_matched from the runner
body: <p>On redmine 1.2/rails 2.3.11 I'm rendering a repository markdown file as html (as <a href="https://github.com/tmtm/redmine_markdown_extra_viewer" rel="nofollow">redmine_markdown_extra_viewer</a> does), and now I'am trying to cache the result, which should be updated on each commit.</p>
  
  <p>So I have a git hook that fetch the repo changes, and i'd like it to also clear the corresponding cache entries.</p>
  
  <p>Cache generation (in a RepositoriesController::entry override):</p>
  
  <pre class="lang-rb prettyprint-override"><code>cache_key =['repositories_md', @project.id.to_s, @path.to_s].join('/')
  puts cache_key
  @content = cache_store.fetch cache_key do
     Kramdown::Document.new(@repository.cat(@path, @rev)).to_html
  end
  render :action =&gt; "entry_markdown"
  </code></pre>
  
  <p>The hook that should clear the cache, but has no effect:</p>
  
  <pre class="lang-bsh prettyprint-override"><code># This is ok
  ruby script/runner "Repository.fetch_changesets"
  
  # This not
  ruby script/runner "Rails.cache.delete_matched(/repositories_md\/.*/)"
  </code></pre>
  
  <p>So it doesn't work and i don't even know if i've taken the right direction to implement that. Any input much appreciated!</p>