ASP.NETのSQLCacheDependencyのPHPバージョン
-
29-09-2019 - |
質問
C#ASP.NETアプリケーションを作成するときにSQLCacheDependencyは非常に役立ち、PHPアプリケーションで同様のものを使用したいと思っています。誰かが何かを提案できますか?
SQLCacheDependency指定されたテーブルがデータベースで変更されるまで、ページページ出力を永久にキャッシュします。
これがASP.NETで起こることの基本的なJISTです:
SqlCacheDependency SqlDep = null;
// Check the Cache for the SqlSource key.
// If it isn't there, create it with a dependency
// on a SQL Server table using the SqlCacheDependency class.
if (Cache["MyCache"] == null) {
SqlDep = new SqlCacheDependency("DatabaseName", "TableName");
// Perform action to be cached ...
var result = DatabaseIntensiveFunction();
Cache.Insert("MyCache", result, SqlDep);
}
else {
// The data was retrieved from the Cache.
}
// Output page from cache.
Output(Cache["MyCache"]);
それで、誰かがmysqlテーブル依存性技術を知っていますか? - 時間ベースのキャッシュよりもはるかにクリーン。
解決
のようなものを使ってみませんか memcache また APC このため?
編集:私も見つけました mysqlndクエリキャッシュ 5.3.3のプラグイン。
所属していません StackOverflow