如果database.my webconfig文件的表中的数据有代码,我想从缓存中获取数据;
<connectionStrings>
<add name="baglantiaditbluyeler" connectionString="Data Source=MURATAKARSU;Initial Catalog=verilerim;Integrated Security=SSPI"/>
</connectionStrings>
<system.web>
<caching>
<sqlCacheDependency enabled="true" pollTime="5000" >
<databases>
<add name="verilerim" connectionStringName="baglantiaditbluyeler"/>
</databases>
</sqlCacheDependency>
</caching>
它可以按照我的意愿运行。但是如果我想缓存另一个表,我是否应该插入与另一个表名称相同的代码。即我的代码应该如下所示?
<connectionStrings>
<add name="baglantiaditbluyeler" connectionString="Data Source=MURATAKARSU;Initial Catalog=verilerim;Integrated Security=SSPI"/>
<add name="baglantiaditblSorular" connectionString="Data Source=MURATAKARSU;Initial Catalog=verilerim;Integrated Security=SSPI"/>
</connectionStrings>
<system.web>
<caching>
<sqlCacheDependency enabled="true" pollTime="5000" >
<databases>
<add name="verilerim" connectionStringName="baglantiaditbluyeler"/>
<add name="verilerim2" connectionStringName="baglantiaditblSorular"/>
</databases>
</sqlCacheDependency>
</caching>
我的代码运行,但我想教它是真的方式。