Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Data Caching Doubt

Data Caching Doubt

Scheduled Pinned Locked Moved .NET (Core and Framework)
questioncssdatabaseannouncement
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aswini
    wrote on last edited by
    #1

    i have a data grid which is displaying the details of empolyee such as empid,empname,empsal,empaddress i am fetching the details from database put it into a cache... i am refreshing this cache for every 5 minutes.... My question is if there is any update in the database , within the 5 minutes.. how can i update in the datagrid.. with in 5 minutes?? (after 5 minutes it will be automatically done beacuse of caching)

    Aswini

    M N 2 Replies Last reply
    0
    • A aswini

      i have a data grid which is displaying the details of empolyee such as empid,empname,empsal,empaddress i am fetching the details from database put it into a cache... i am refreshing this cache for every 5 minutes.... My question is if there is any update in the database , within the 5 minutes.. how can i update in the datagrid.. with in 5 minutes?? (after 5 minutes it will be automatically done beacuse of caching)

      Aswini

      M Offline
      M Offline
      moon_stick
      wrote on last edited by
      #2

      You could start by asking in the right forum?! I'm not aware of an easy solution - you'd probably have to set up a trigger against your database table and have that call a piece of CLR code that reset the cache in the application... A better way would be to reconsider how you're using your cache - if the data is invalidated before the cache expires then your policy is almost certainly wrong.

      It definitely isn't definatley

      N 1 Reply Last reply
      0
      • M moon_stick

        You could start by asking in the right forum?! I'm not aware of an easy solution - you'd probably have to set up a trigger against your database table and have that call a piece of CLR code that reset the cache in the application... A better way would be to reconsider how you're using your cache - if the data is invalidated before the cache expires then your policy is almost certainly wrong.

        It definitely isn't definatley

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        And what is wrong with this forum for the question? The question seemed to be a general .net related inquiry. Have a look at SqlDependency


        only two letters away from being an asset

        M 1 Reply Last reply
        0
        • A aswini

          i have a data grid which is displaying the details of empolyee such as empid,empname,empsal,empaddress i am fetching the details from database put it into a cache... i am refreshing this cache for every 5 minutes.... My question is if there is any update in the database , within the 5 minutes.. how can i update in the datagrid.. with in 5 minutes?? (after 5 minutes it will be automatically done beacuse of caching)

          Aswini

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Have a look at SqlDependencyCache http://msdn2.microsoft.com/en-us/library/ms178604.aspx[^]


          only two letters away from being an asset

          1 Reply Last reply
          0
          • N Not Active

            And what is wrong with this forum for the question? The question seemed to be a general .net related inquiry. Have a look at SqlDependency


            only two letters away from being an asset

            M Offline
            M Offline
            moon_stick
            wrote on last edited by
            #5

            This post was originally in the lounge - looks like someone's been doing some housekeeping.

            It definitely isn't definatley

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups