I am developing a social portal which has a lot of facebook/twitter
type features.

When a user is looking at any page belonging to a member I display a
header_member.ctp element which needs to show that member's username,
gravatar and a few options including a follow or unfollow link if the
logged in user is following the member or not.

I have the following element call:

<?php echo $this->element('header_member', array(
  'user_id'=>$user['User']['id'],
  'title'=>'Profile',
  'cache'=>'+1 hours',
  'key'=>$user['User']['id'].'-'.$session->read('Auth.User.id')
)); ?>

Which caches my element for 1 hour and I am passing a unique key so I
can use this element for every combination of member viewing another
member.  But if they click the follow/unfollow link I need to somehow
disable the caching so my follow/unfollow button will reflect the
change made.

Is there any way to delete the cached element from my add/delete
controller actions causing the element to create a new cache?

Thanks,

Paul.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to