Copied to clipboard

Flag this post as spam?

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


  • Giorgos 6 posts 76 karma points
    Mar 08, 2016 @ 10:00
    Giorgos
    0

    IContentFinder code executes once for each url

    I try to make certain things when a user visits specific urls.

    public class Test : IContentFinder
    {
        public bool TryFindContent(PublishedContentRequest contentRequest)
        {
            var path = contentRequest.Uri.PathAndQuery.ToLower();
    
            // This part is executed only once for each url
        }
    }
    

    At the above code at the point that I have the comment I want to store some information about the url in the database but the code executes only once. I suppose that Umbraco does not execute the code because the url has been cached. Can someone tell me why this happens and if the problem is because the URL has been cached can someone tell me how to delete the cached page for a specific url. This url may not be a real umbraco page. This is the reason that I use the IContentFinder.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Mar 10, 2016 @ 08:49
    Jeroen Breuer
    0

    Hello,

    In this example I explain how a UrlProvider and ContentFinder work: https://our.umbraco.org/projects/developer-tools/1-1-multilingual-example/

    I also explain it in this video: https://youtu.be/DWjbJiIUQdk?t=11m17s

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft