Bug in the CacheDependency or Cache object? Help!

Discussion in 'ASP .Net' started by Dave, Sep 24, 2007.

  1. Dave

    Dave Guest

    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
    Dave, Sep 24, 2007
    #1
    1. Advertising

  2. Dave

    Dave Guest

    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" <> wrote in message
    news:e1T3z4u$...
    > 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
    >
    Dave, Sep 25, 2007
    #2
    1. Advertising

  3. Dave

    Dave Guest

    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" <> wrote in message
    news:%236sxBxz$...
    > 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" <> wrote in message
    > news:e1T3z4u$...
    >> 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
    >>

    >
    Dave, Sep 25, 2007
    #3
  4. Dave

    Dave Guest

    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" <> wrote in message news:%23jhnMw5$...
    > 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" <> wrote in message
    > news:%236sxBxz$...
    >> 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" <> wrote in message
    >> news:e1T3z4u$...
    >>> 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
    >>>

    >>

    >
    Dave, Sep 25, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Keith
    Replies:
    0
    Views:
    518
    Keith
    Oct 1, 2003
  2. Brian

    CacheDependency

    Brian, Dec 20, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    544
    Brian
    Dec 20, 2003
  3. Dave S

    cachedependency not working ?

    Dave S, Jul 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    777
    Dave S
    Jul 21, 2004
  4. =?Utf-8?B?RGlmZmlkZW50?=

    CacheDependency to Oracle table

    =?Utf-8?B?RGlmZmlkZW50?=, Jan 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,826
    Saravana
    Jan 7, 2005
  5. Weston Weems
    Replies:
    0
    Views:
    439
    Weston Weems
    May 27, 2005
Loading...

Share This Page