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.

1 Answer 1

3

Let's try:

SqlDependency = "[database]:[table1];[database]:[table2]"
Sign up to request clarification or add additional context in comments.

2 Comments

@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.
@Piotr Czarnecki, I have found the issue its due to the "pollTime" in webConfig. I have reduce the values so its works fine

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.