Copied to clipboard

Flag this post as spam?

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


  • Cimplex 113 posts 576 karma points
    Jan 08, 2015 @ 01:14
    Cimplex
    0

    Umbraco caches database calls in application

    Hi, i've created a custom application in Umbraco 7.1 where admin can create and edit some data.

    The flow is like this:

    • Angular $http.get and get object as json
    • Updates the object
    • Save the object using $http.post

    Everything works great just that my old data is still in my input fields. (Tryed reloading the page, clear cache but it dosen't help) I've checked my database (MSSQL) and it updates correctly with the new values.

    For me it looks like Umbraco caches the $http.get results. Any ideas?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 08, 2015 @ 05:35
    Jan Skovgaard
    0

    Hi Cimplex and welcome to our :)

    What browser are you using? I thin there might be some general angularjs cache issues with IE10/11 if I remember correctly when using $http.get/post.

    /Jan

  • Cimplex 113 posts 576 karma points
    Jan 08, 2015 @ 11:49
    Cimplex
    0

    Hi Jan,
    Google Chrome. I dont think it is the browser cache because i cleared it / restarted the browser / reloaded the page. The only soloution is to rebuild my project.

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Jan 08, 2015 @ 11:55
    Dave Woestenborghs
    0

    How are you inserting/updating your database ? Can you provide some code

  • Cimplex 113 posts 576 karma points
    Jan 08, 2015 @ 15:18
    Cimplex
    100

    Hi, i found a solution. In my code i had a helper class that did some logic before the query to the database. I placed the query in the controller and now it works. Strange.. 

     

Please Sign in or register to post replies

Write your reply to:

Draft