Rad Chart Caching

Thread is closed for posting
3 posts, 0 answers
  1. Cary
    Cary avatar
    18 posts
    Member since:
    Feb 2008

    Posted 19 Feb 2009 Link to this post

    Hi, I have an issue where the rad chart control is putting a large amount of chart renders into cache. Is there any way to turn this off?

    To help setup the scenario we only use the charting control on one page, and that page is only viewable from a PC which displays the chart on a monitor. It's to help our sales guys and bosses to see turn around time for quotes. So it isn't an issue where a lot of people are hitting the chart because only one PC does. The page auto-refreshes the data once a minute using the Microsoft Ajax Timer control so no page post-back occurs. If I clear the cache, within a minute about 100 renders are cached again. The cache key is something like this "2888f173-6587-4610-aa66-c1b7ab206eb2_chart_ctl00$cphMainContent$chartTurnAround" cphMainContent is the content place holder ID, and chartTurnaround is the ID I gave to the chart.


    Code included below:
    Telerik Rad Ajax chart version 2008.3.1105.35

                        <telerik:RadChart ID="chartTurnAround" runat="server" Skin="BlueStripes" Width="700px" 

                chartTurnAround.DataSource = var 
                Dim ser As New Telerik.Charting.ChartSeries("Turn Around", Telerik.Charting.ChartSeriesType.Bar) 
                ser.DataLabelsColumn = "TurnAround" 
                ser.DataYColumn = "TurnAround" 
                chartTurnAround.SeriesOrientation = Telerik.Charting.ChartSeriesOrientation.Horizontal 
                chartTurnAround.PlotArea.XAxis.DataLabelsColumn = "FullName" 
                Dim max As Decimal = (From v In var Select v.TurnAround).Max() 
                max = IIf(max = 0, 10, max) 
                chartTurnAround.PlotArea.YAxis.AutoScale = False 
                chartTurnAround.PlotArea.YAxis.MinValue = 0 
                chartTurnAround.PlotArea.YAxis.MaxValue = max + (max Mod 10) 
                chartTurnAround.PlotArea.YAxis.Step = 10 
                chartTurnAround.ChartTitle.TextBlock.Text = "Average TurnAround Time (days)" 
                chartTurnAround.Legend.Visible = False 
                chartTurnAround.AutoLayout = True 
                chartTurnAround.PlotArea.EmptySeriesMessage.TextBlock.Text = "No Tasks have been completed in the last 7 days." 

  2. Giuseppe
    Giuseppe avatar
    2363 posts

    Posted 23 Feb 2009 Link to this post

    Hi Cary,

    Indeed the RadChart HttpHandler uses the Http Cache in order to improve performance when serving the chart images on subsequent calls. The content is kept in the cache for 5 minutes and then is automatically cleared -- this functionality cannot be customized and caching cannot be disabled.

    However, we are unable to reproduce the problematic behavior with the chart caching 100 renders in just a minute when it it updated on a timer with 1 minute interval. Could you send us a runnable sample application and a step by step guide how to track this behavior (you need to open a formal support ticket as attachments are not allowed in the public forums).

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Cary
    Cary avatar
    18 posts
    Member since:
    Feb 2008

    Posted 25 Feb 2009 Link to this post

    Actually, the difference is that the timer fires every second. I did this so the user had a count down clock to the next refresh. If I take that out then it works just fine. I'm guessing because the timer and the way it works there is no real fix to this which is fine.. It's not like the images are that big. I think in total after five minutes of running it was about 12 meg.
Back to Top