Invalidate cache for another Page

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Invalidate cache for another Page

a@kid
I have some dynamically generated content that is displayed on pages  
in the main namespace. The content is updated through a custom  
special page.

Is there any way to invalidate the cache for the related pages when  
the content is updated on the special page?

thanks in advance
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Invalidate cache for another Page

Rob Church
On 13/04/06, a@kid <[hidden email]> wrote:
> Is there any way to invalidate the cache for the related pages when
> the content is updated on the special page?

Update the timestamp in page.page_touched for each affected page:

$dbw =& wfGetDB( DB_MASTER );
$dbw->update( 'page', array( 'page_touched' => $dbw->timestamp() ),
array( 'page_id' => $id ) );

where $id is the $id of a single page; or do a fancier update using
WHERE page_id IN ( set ) to touch multiple pages.


Rob Church
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l