Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vincent Baaij 95 posts 344 karma points c-trib
    Mar 30, 2011 @ 17:00
    Vincent Baaij
    0

    How to catch AfterUpdateDocumentCache?

    Hi,

    Who knows why the following code gives an error

    public class MyEvent : ApplicationBase
        {
            public MyEvent()
            {
                umbraco.content.AfterUpdateDocumentCache += new umbraco.content.DocumentCacheEventHandler(content_AfterUpdateDocumentCache);
    }
    }
    

    No overload for 'content_AfterUpdateDocumentCache' matches delegate 'umbraco.content.DocumentCacheEventHandler'

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Mar 30, 2011 @ 18:25
    Richard Soeteman
    0

    Hi Vincent,

    You have wired up the evnt handler, you need to have the method as well

      public class MyEvent : ApplicationBase

        {

            public MyEvent()

            {

                umbraco.content.AfterClearDocumentCache += new umbraco.content.DocumentCacheEventHandler(content_AfterClearDocumentCache); ;

            }

     

            void content_AfterClearDocumentCache(umbraco.cms.businesslogic.web.Document sender, umbraco.cms.businesslogic.DocumentCacheEventArgs e)

            {

                throw new NotImplementedException();

            }

     

        }

     Hope this helps you,

    Richard

  • Vincent Baaij 95 posts 344 karma points c-trib
    Mar 30, 2011 @ 23:27
    Vincent Baaij
    0

    Thanks Richard.

    I had already tried it again and after generating the code again in VS it al worked. Tried to edit and delete the forum but that desn't seem to work....

Please Sign in or register to post replies

Write your reply to:

Draft