Cache fix for scheduled posts and xml-rpc.

This will allow the cache to be scheduled to be cleared when a scheduled post is published or if a post is published via xml-rpc.