Questions tagged [sqlcachedependency]

Establishes a relationship between an item stored in an ASP.NET application's Cache object and either a specific SQL Server database table or the results of a SQL Server 2005 query

System.Object
. System.Web.Caching.CacheDependency
. . System.Web.Caching.SqlCacheDependency

Namespace: System.Web.Caching
Assembly: System.Web (in System.Web.dll)

On all supported versions of SQL Server (Microsoft SQL Server 7.0, Microsoft SQL Server 2000, and SQL Server 2005) the SqlCacheDependency class monitors a specific SQL Server database table. When the table changes, items associated with the table are removed from the Cache, and a new version of the item is added to the Cache.

http://msdn.microsoft.com/en-us/library/system.web.caching.sqlcachedependency.aspx

78 questions
0
votes
1 answer

How to my stored procedure make it fast and beautiful...( select . select. select.. )

I'm junior Ruby-mysql programmer and I want to know how to make my (Stored procedure )query result fast.. here is my Stored procedure and I'm using SQL_CACHE.. but I'm not sure.. the cache makes my procedure fast.. : ( DROP PROCEDURE IF EXISTS…
ddc
  • 3
  • 2
0
votes
2 answers

Caching paged LINQ results without using Skip() or Take()

I am using LINQ for paging data in my website. I am currently using Skip() and Take() to perform the paging. Now I want to cache the data using cache dependencies so that the the cache will invalidate if the data changes. However SQL Server's query…
sagescrub
  • 549
  • 1
  • 8
  • 20
0
votes
2 answers

How to add caching to my MVC Application and WCF Service

I have an MVC Web application that basically queries a SQL store procedure for a list of products,I have a WCF service layer that is responsible for the database querying, there is a call that gets products by category and return the data to MVC…
Papi
  • 555
  • 13
  • 40
0
votes
1 answer

Differences between SqlDependency and SqlCacheDependency

I do have a question: I'm working on an ASP.Net Web Forms and C# app and I use a gridView in order to show the data from a table so I've decided to cache. I did the aspnet_regsql -ed -E -d Store aspnet_regsql -et -E -d Store-t Customers and the…
Pablo Tobar
  • 614
  • 2
  • 13
  • 37
0
votes
2 answers

Can We use SqlCacheDependency with a product not containing ASP.net part?

Is SQLCacheDependency used in context of ASP.net or can it be used for a project of .net only. Rather tahn using ASP.net i am receiving request by listening on a port.I want to store data for my session in cache.If this data is fetched from database…
Maddy.Shik
  • 6,609
  • 18
  • 69
  • 98
0
votes
1 answer

Regarding how sql cache dependency works

here i go through a article on sql cache dependency from this site http://www.dotnetcurry.com/showarticle.aspx?ID=263. specially a routine was called which cache the table data first time and when underlying table data will be changed then routine…
Thomas
  • 33,544
  • 126
  • 357
  • 626
0
votes
1 answer

How do I programatically modify the SqlCacheDependency section of web.config

I have this section in my web.config
Ovidiu
  • 1,407
  • 12
  • 11
0
votes
1 answer

sql server 2008 - sqlcachedependency without trigger?

I am so puzzled. I am using this open-source snippet. I have a table without any triggers in SQL Server, and yet the SQLCacheDependency is working fine. I thought you needed triggers on the table for it to work?! DateTime…
TPR
  • 2,567
  • 10
  • 41
  • 65
0
votes
6 answers

SQL Cache Dependency not working with Stored Procedure

I can't get SqlCacheDependency to work with a simple stored proc (SQL Server 2008): create proc dbo.spGetPeteTest as set ANSI_NULLS ON set ANSI_PADDING ON set ANSI_WARNINGS ON set CONCAT_NULL_YIELDS_NULL ON set QUOTED_IDENTIFIER ON set…
pjacko
  • 542
  • 1
  • 6
  • 17
0
votes
1 answer

How to clear cache of latest select query that was run? (or prevent a select query from caching)

I am using MS SQL Server 2012. I am trying to see the optimization in the server so I can't just clear everything. This link didn't work for me. (or this example) Any suggestions how I can select the query and clear the cache afterwards? (or…
0
votes
1 answer

SQLCacheDependency with SqlCommand never null

I need to implement cache dependency on a sql select command that selects one value (latest modified date of some rows). My problem is that although I update the content and when I run the query manually, I see the new date, the system doesn't…
user176657
  • 125
  • 1
  • 4
  • 13
0
votes
1 answer

Mvc 4 cache database for ecommerce project

I have a MVC4 project for ecommerce about to finish. I use sqldependecy with outputcache. But what is the best way of this? Product detail page ? category page which have products list ? filter page ? bla bla Could you help me about caching? (i use…
0
votes
3 answers

Cache and SqlCacheDependency (ASP.NET MVC)

We need to return subset of records and for that we use the following command: using (SqlCommand command = new SqlCommand( "SELECT ID, Name, Flag, IsDefault FROM (SELECT ROW_NUMBER() OVER (ORDER BY @OrderBy DESC) as Row, ID,…
Fabio Milheiro
  • 8,100
  • 17
  • 57
  • 96
0
votes
1 answer

SqlCacheDependency via Service Broker Notifications - SELECT sensitive ONLY on particular columns

Is it possible to define a Notification on SELECT, but in that way: the Broker would reset Cache only if columns written in select has changed. So Column Sensitive approach. I don't want the cache resets if some unimportant column in the table are…
0
votes
1 answer

ASP.NET Caching suggestion

I have an ASP.NET website for which I want to implement ASP.NET caching. There is a master list of items that only master users can see when they login. All other users only see a subset of the master list. I want to cache the master list using…
harishm
  • 41
  • 4