Application1 uses Microsoft Enterprise Library Caching Application Block with IsolatedStorageBackingStore to cache data from a database accessed by Internet. The task is to create another Application2 (helper application like "Adobe Flash Player uninstaller") which will be able to clear the cache of Application1 (this will be one of many features of Application2).
Application1使用Microsoft Enterprise Library缓存应用程序块和IsolatedStorageBackingStore来缓存Internet访问的数据库中的数据。任务是创建另一个Application2(帮助应用程序,如“Adobe Flash Player卸载程序”),它将能够清除Application1的缓存(这将是Application2的许多功能之一)。
The question is - how can Application2 get the caching folder path of Application1 (in order to clear it)?
问题是 - Application2如何获取Application1的缓存文件夹路径(为了清除它)?
The path will be something like "<System Drive>\Documents and Settings\<User>\Local Settings\Application Data\IsolatedStorage\tqli5mdv.xa5\htccao3l.ksb\StrongName.1r3fiexsbrusebdd0maaohl2i5cz4lhq\StrongName.mwjgo5cc1qomwe5tbepbfnyucq0obm3f\Files\<BackingStore PartitionName>
"?
该路径将类似于“
It's a pity, but the User has several applications with the same <BackingStore PartitionName>
and this can't be changed, so Application2 can't find this path by <BackingStore PartitionName>
string (course there will be several folders - one for each application - and I don't know how Application2 can choose which folder belongs to Application1). I was Googled a lot but with no result. Please help.
遗憾的是,用户有几个具有相同
1 个解决方案
#1
I'm not sure about the most recent versions of the Caching block, but previous versions wouldn't allow you to do this. They partition the store by the application's assembly name (amongst other things) so two applications can't see each others data.
我不确定最新版本的缓存块,但以前的版本不允许你这样做。它们通过应用程序的程序集名称(以及其他内容)对存储进行分区,因此两个应用程序无法查看彼此的数据。
#1
I'm not sure about the most recent versions of the Caching block, but previous versions wouldn't allow you to do this. They partition the store by the application's assembly name (amongst other things) so two applications can't see each others data.
我不确定最新版本的缓存块,但以前的版本不允许你这样做。它们通过应用程序的程序集名称(以及其他内容)对存储进行分区,因此两个应用程序无法查看彼此的数据。