Using NCache 4.6 as EF 6.1.3 second level cache, SqlDependency is not working. (It cant detect changes that I make directly in SQL server. Also does not update cache or invalidate it when using EF to add or delete entities to database. Albeit it detect updating an entity)
I've installed NCache in my computer with IP: 192.168.56.1
and SQL server 2014 in vbox with IP: 192.168.56.101
using instruction from their site and customizing them to meet my IP & user, I executed following SQL:
ALTER DATABASE NORTHWND SET ENABLE_BROKER with rollback immediate;
GO
--Select is_broker_enabled from sys.databases where name ='NORTHWND'
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO user1
GRANT CREATE QUEUE TO user1
GRANT CREATE SERVICE TO user1
GRANT CREATE PROCEDURE TO user1
CREATE QUEUE "NCacheSQLQueue-192.168.56.1";
CREATE SERVICE "NCacheSQLService-192.168.56.1" ON QUEUE."NCacheSQLQueue-192.168.56.1"([http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification]);
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO user1;
GRANT RECEIVE ON "NCacheSQLQueue-192.168.56.1" TO user1;
GRANT RECEIVE ON QueryNotificationErrorsQueue TO user1;
GRANT SEND ON SERVICE :: "NCacheSQLService-192.168.56.1" to user1;
Also, select * from sys.dm_qn_subscriptions
shows that no one is subscribed.