Package ua_parser

Class CachingParser


  • public class CachingParser
    extends Parser
    When doing webanalytics (with for example PIG) the main pattern is to process weblogs in clickstreams. A basic fact about common clickstreams is that in general the same browser will do multiple requests in sequence. This has the effect that the same useragent will appear in the logfiles and we will see the need to parse the same useragent over and over again. This class introduces a very simple LRU cache to reduce the number of times the parsing is actually done.
    Author:
    Niels Basjes