Forum: Ruby on Rails caching and admin area

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
78b15ebcefd5841518b097a2615ea9ca?d=identicon&s=25 Felix McCoey (Guest)
on 2006-02-21 03:13
(Received via mailing list)
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
9470dd718ec85af5d6674f113dec6d2d?d=identicon&s=25 Daniel Bogan (Guest)
on 2006-02-21 03:22
(Received via mailing list)
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/>
waferboy  : <http://waferboy.com/>

I make the Internets.
07b8ebc9dd4f357d1c27089f73f6f142?d=identicon&s=25 Daniel Bogan (Guest)
on 2006-02-21 03:29
(Received via mailing list)
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/>
waferboy  : <http://waferboy.com/>

I make the Internets.
This topic is locked and can not be replied to.