3

I am using outputcache sqldependency and it works absolutely fine, but now I want to depend on multiple tables.

[OutputCache(Duration = 600, SqlDependency = "db:table1")]

My question: Is sqldependency support relying on multiple tables? if yes, then what is the syntax?

I tried the following syntax, but it did not work, it considers this table1,table2 as a name for one table.

[OutputCache(Duration = 600, SqlDependency = "db:table1,table2")]

Thanks in advance.

Rana
  • 1,170
  • 3
  • 14
  • 28

1 Answers1

3

Let's try:

SqlDependency = "[database]:[table1];[database]:[table2]"
Piotr Czarnecki
  • 1,688
  • 3
  • 14
  • 22
  • @Piotr Czarnecki, Hi, I have tried the same thing what you have explained. For first table change it works perfectly but for table2 its not working properly. It access the action after 5 to 6 times to page refresh. – Golda Jul 08 '15 at 07:06
  • 1
    @Piotr Czarnecki, I have found the issue its due to the "pollTime" in webConfig. I have reduce the values so its works fine – Golda Jul 08 '15 at 09:41