How do i cache this?

i have a account controller, where the user can make a post private or

the function that views a public post is in the ‘main’ controller.

i put cache :view_post in the main controller, but now if the user
changes the setting in the account controller how can i delete the cache
that is located in the main controller?

each cache file is stored in /public/user/name_of_user/ cache file.

so where do i put the expire and with what parameters?

expire (:action => view_post, :user => name_of_user, :id => id of