# Caching and admin area

**URL:** <https://www.ruby-forum.com/t/caching-and-admin-area/71127>\
**Category:** Rails\
**Created:** [February 21, 2006, 3:13am UTC](https://www.ruby-forum.com/t/caching-and-admin-area/71127 "2006-02-21T03:13:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felix\_McCoey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@Felix\_McCoey](https://www.ruby-forum.com/u/Felix_McCoey)\
**Post date:** [February 21, 2006, 3:13am UTC](https://www.ruby-forum.com/t/caching-and-admin-area/71127/1 "2006-02-21T03:13:50Z")

</div>

i have created some ‘public’ controllers like so:

./script/generate controller example

and an ‘admin’ controller like this:

./script/generate controller admin/example

now i want to have caching in the ‘public’ controllers so i add  
something like this:

caches\_action :show, :whatever

but i want the ‘admin’ controller to do the sweeping. now if i add this  
to the ‘admin’ controller it doesn’t work as the :controller field is  
referring to the ‘admin’ controller:

expire\_action(:controller =\> ‘example’, :action =\> ‘show’)

how do i refer to the ‘public’ controller from within the ‘admin’  
controller so that i can expire different parts of the cache?

thanks

-felix

---

<div class="post-metadata">

**Author:** ![Felix\_McCoey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@Felix\_McCoey](https://www.ruby-forum.com/u/Felix_McCoey)\
**Post date:** [February 21, 2006, 3:22am UTC](https://www.ruby-forum.com/t/caching-and-admin-area/71127/2 "2006-02-21T03:22:53Z")

</div>

does something like:

```
expire_action(:controller => '/admin/example', :action => 'show')

```

work for you?

d.

On 21/02/2006, at 1:10 PM, Felix McCoey wrote:

> expire\_action(:controller =\> ‘example’, :action =\> ‘show’)
> 
> how do i refer to the ‘public’ controller from within the ‘admin’  
> controller so that i can expire different parts of the cache?

–

Daniel Bogan

waferbaby : [http://waferbaby.com/](http://waferbaby.com/)  
waferboy : [http://waferboy.com/](http://waferboy.com/)

I make the Internets.

---

<div class="post-metadata">

**Author:** ![Felix\_McCoey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@Felix\_McCoey](https://www.ruby-forum.com/u/Felix_McCoey)\
**Post date:** [February 21, 2006, 3:29am UTC](https://www.ruby-forum.com/t/caching-and-admin-area/71127/3 "2006-02-21T03:29:08Z")

</div>

On 21/02/2006, at 1:18 PM, Daniel Bogan wrote:

> expire\_action(:controller =\> ‘/admin/example’, :action =\> ‘show’)

uh, yeah, i can read. i actually meant:

```
expire_action(:controller => '/example', :action => 'show')

```

d.

–

Daniel Bogan

waferbaby : [http://waferbaby.com/](http://waferbaby.com/)  
waferboy : [http://waferboy.com/](http://waferboy.com/)

I make the Internets.
