Interest in new API function?

BicketyBam
2004-06-27
2004-06-30
  • BicketyBam

    BicketyBam - 2004-06-27

    It would be great to be able to delete entries from the Key cache based on either a regular expression, or more simply based on a root string.

    I'm trying to implement caching on a set of forums. I cache each posts HTML output. On one post within a thread being removed I need to remove all the other cached posts (posts are displayed in alternating colours).

    If I store these keys as "post.<topicid#>.<postid#>" it would be nice to be able to mmcache_rm_match("post.<topicid#>.*").

    Is there any chance of this function being added to the API by the current dev team?

    If not does anyone think it would be a worthwhile addition? If so I may have a stab at it.

     
    • Gabriel Ricard

      Gabriel Ricard - 2004-06-29

      It seems like it's certainly possible, but it's probably going to be slow if you've got a lot of data cached as it's all referenced via a hash so you my very well have to do a linear search.

       
    • BicketyBam

      BicketyBam - 2004-06-30

      Yes, I've had a further delve into the code and it is hashed.
      There would have to be a secondary table to hold original keys. Not sure if this is worth the overhead?

       
    • Gabriel Ricard

      Gabriel Ricard - 2004-06-30

      What about storing an array of they key names in mmcache? You could have a wrapper function that obtains a lock, adds the cached item, and then adds the key to the array and then unlocks it.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks