Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Bug in the CacheDependency or Cache object? Help!

Reply
Thread Tools

Bug in the CacheDependency or Cache object? Help!

 
 
Dave
Guest
Posts: n/a
 
      09-24-2007
Using ASP.Net 2.0 on Vista with IIS6, if I set a CacheDependency on a file
into a Cache entry that I insert and then delete a subdirectory in the same
directory that the file is located in then my dependency is triggered and my
cache object is deleted.

If I create a directory or delete another file in that same directory then
the Cache is not bothered.

My CacheDependency specifies the full and proper file name and not just the
directory path.

Is this a known problem?

Fix or workaround?

Thanks,
Dave at DotNetCodeSlingers dot com

 
Reply With Quote
 
 
 
 
Dave
Guest
Posts: n/a
 
      09-25-2007
Anone had this problem? Please try to see if get similar results. Could be
easily tested in some current asp.net 3.0 app just by deleting a directory.

Thanks for any feedback,
Dave


"Dave" <(E-Mail Removed)> wrote in message
news:e1T3z4u$(E-Mail Removed)...
> Using ASP.Net 2.0 on Vista with IIS6, if I set a CacheDependency on a file
> into a Cache entry that I insert and then delete a subdirectory in the
> same directory that the file is located in then my dependency is triggered
> and my cache object is deleted.
>
> If I create a directory or delete another file in that same directory then
> the Cache is not bothered.
>
> My CacheDependency specifies the full and proper file name and not just
> the directory path.
>
> Is this a known problem?
>
> Fix or workaround?
>
> Thanks,
> Dave at DotNetCodeSlingers dot com
>


 
Reply With Quote
 
 
 
 
Dave
Guest
Posts: n/a
 
      09-25-2007
Got this working by discreetly deleting the files in a parallel directory
rather than recreating the directory but then caching broke again if I write
a file into a sub sub directory from the root directory. Sort of like
caching is dependent on the entire directory tree CONTAINING the dependent
file rather than just the file itself.

Would love MSFT or anyone to comment on this please.

Is this a bug or expected behaviour. Is there a workaround?

Thanks,
Dave

"Dave" <(E-Mail Removed)> wrote in message
news:%236sxBxz$(E-Mail Removed)...
> Anone had this problem? Please try to see if get similar results. Could be
> easily tested in some current asp.net 3.0 app just by deleting a
> directory.
>
> Thanks for any feedback,
> Dave
>
>
> "Dave" <(E-Mail Removed)> wrote in message
> news:e1T3z4u$(E-Mail Removed)...
>> Using ASP.Net 2.0 on Vista with IIS6, if I set a CacheDependency on a
>> file into a Cache entry that I insert and then delete a subdirectory in
>> the same directory that the file is located in then my dependency is
>> triggered and my cache object is deleted.
>>
>> If I create a directory or delete another file in that same directory
>> then the Cache is not bothered.
>>
>> My CacheDependency specifies the full and proper file name and not just
>> the directory path.
>>
>> Is this a known problem?
>>
>> Fix or workaround?
>>
>> Thanks,
>> Dave at DotNetCodeSlingers dot com
>>

>


 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      09-25-2007
Well I found another workaround for the 2nd problem by writing into a directory parallel to the dependent file which was in the website root. The 2nd problem seems to be that I could not write a file into a subdir of the \bin directory without blowing the Cache objects that were dependent upon a file in the website root.

So in summary there is a bug in CacheDependency when used with Cache for a dependent file in the website roor that deletes the cached item if:
a.. writing data to a file in a subdir of the \bin directory
b.. deleting and creating a directory that is parallel to the dependent file
Would be great if anyone could verify this or if MSFT would fix! Don't think it is my imagination run wild...

Thanks,
Dave

"Dave" <(E-Mail Removed)> wrote in message news:%23jhnMw5$(E-Mail Removed)...
> Got this working by discreetly deleting the files in a parallel directory
> rather than recreating the directory but then caching broke again if I write
> a file into a sub sub directory from the root directory. Sort of like
> caching is dependent on the entire directory tree CONTAINING the dependent
> file rather than just the file itself.
>
> Would love MSFT or anyone to comment on this please.
>
> Is this a bug or expected behaviour. Is there a workaround?
>
> Thanks,
> Dave
>
> "Dave" <(E-Mail Removed)> wrote in message
> news:%236sxBxz$(E-Mail Removed)...
>> Anone had this problem? Please try to see if get similar results. Could be
>> easily tested in some current asp.net 3.0 app just by deleting a
>> directory.
>>
>> Thanks for any feedback,
>> Dave
>>
>>
>> "Dave" <(E-Mail Removed)> wrote in message
>> news:e1T3z4u$(E-Mail Removed)...
>>> Using ASP.Net 2.0 on Vista with IIS6, if I set a CacheDependency on a
>>> file into a Cache entry that I insert and then delete a subdirectory in
>>> the same directory that the file is located in then my dependency is
>>> triggered and my cache object is deleted.
>>>
>>> If I create a directory or delete another file in that same directory
>>> then the Cache is not bothered.
>>>
>>> My CacheDependency specifies the full and proper file name and not just
>>> the directory path.
>>>
>>> Is this a known problem?
>>>
>>> Fix or workaround?
>>>
>>> Thanks,
>>> Dave at DotNetCodeSlingers dot com
>>>

>>

>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CacheDependency for filesystem not firing on file delete or change. Weston Weems ASP .Net 0 05-27-2005 06:36 PM
CacheDependency to Oracle table =?Utf-8?B?RGlmZmlkZW50?= ASP .Net 1 01-07-2005 11:13 PM
cachedependency not working ? Dave S ASP .Net 0 07-21-2004 07:48 AM
CacheDependency Brian ASP .Net 0 12-20-2003 10:41 AM
File locked by another process when cached with CacheDependency Keith ASP .Net 0 10-01-2003 09:29 PM



Advertisments