The reasons why the CD server is not clearing the cache is because the CD Server does not know what to do when receiving the events. So, you need to
Scalability Settings
The InstanceName is used (in this context) for comparison purposes, and for recording the instance that raised an event in the EventQueue, and the Publishing.PublishingInstance setting is used to ensure that all publishing operations are processed on a specific instance, e.g. if I have 3 CMs and set that to CM3 then CM3 will handle all publishing operations for the environment
On CM Servers:
<setting name="InstanceName">
<patch:attribute name="value"></patch:attribute>
</setting>
<setting name="Publishing.PublishingInstance">
<patch:attribute name="value">CM1</patch:attribute>
</setting>
On Publishing Server(1 of your CMs):
<setting name="InstanceName">
<patch:attribute name="value">CM1</patch:attribute>
</setting>
<setting name="Publishing.PublishingInstance">
<patch:attribute name="value"></patch:attribute>
</setting>
On CD Servers:
<setting name="InstanceName">
<patch:attribute name="value"></patch:attribute>
</setting>
<setting name="Publishing.PublishingInstance">
<patch:attribute name="value">CM1</patch:attribute>
</setting>
You also need to have eventQueue setting is enabled. In Sitecore v6.x to 7.2, it is found in the web.config
and v7.5+ it is in the Sitecore.config
<setting name="EnableEventQueues" value="true">
and check if the ProcessingInterval of the EventQueue
<eventQueue>
<!-- Time between checking the queue for newly queued events. If new events are found they will be raised. -->
<processingInterval>00:00:02</processingInterval>
</eventQueue>
Core Database
Make sure that the events in the eventqueue
table in core database of your CMs are also present in the eventqueue
table of your CD. CM and the CDs should share the same core database, optionally through replication
Sites
Your sites should also be added to the publish:end
and publish:end:remote
events since by default, it contains only website. Note that, later on, when you have more sites you will require to update the config file. So, you can add a handler which reads your site definition and then clears the cache of the sites that you have.
Indexes
Make sure that there are no errors in your indexes. That is, Sitecore should be able to rebuild the indexes successfully else, the cache will not get cleared.
processingInterval
set 00:00:02 and finally, have you set the scalability setting? And what Sitecore version are you using?