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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Working with cached DataTables ?

Working with cached DataTables ?

Scheduled Pinned Locked Moved ASP.NET
question
2 Posts 2 Posters 1 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.
  • D Offline
    D Offline
    devboycpp
    wrote on last edited by
    #1

    In a website a DataTable is stored as an entry in the Cache object. On each page load some rows from the table may be removed based on some criteria and also RowFilter property of its default view is manipulated and some fields of the table are set. The question is as the DataTable object and DataView object are not thread safe for write operations ,what is the best way to prevent simultaneous changes to the table stored in cache. lock statement ? is it an expedient way ? or copying the table stored in cache and doing writes on that ?... A good advise from an erudite programmer is welcomed. Thanks in advance .

    J 1 Reply Last reply
    0
    • D devboycpp

      In a website a DataTable is stored as an entry in the Cache object. On each page load some rows from the table may be removed based on some criteria and also RowFilter property of its default view is manipulated and some fields of the table are set. The question is as the DataTable object and DataView object are not thread safe for write operations ,what is the best way to prevent simultaneous changes to the table stored in cache. lock statement ? is it an expedient way ? or copying the table stored in cache and doing writes on that ?... A good advise from an erudite programmer is welcomed. Thanks in advance .

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      That's a complex question. To the best of my knowledge, you can only cache html, css or webforms, and that data is not cached by the web server - IIS6, 7 or 7.5 As far as threads goes, that depends on the app pool settings you choose for the website on the webserver. Classic or Integrated. If your using SQL Server, or even MySQL, the data will be written, and the cache will be updated upon a write.

      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