Leonel,
Am confused as to where to place the prefix code (this is more so because am not too familiar with the cache code)
My understanding is this:

 * The NTFS prefix is applicable for only accessing/manipulating a file
   (with a long file name), from the file system. This prefix does not
   get added to the file name, when it is stored on the file system.
 * The key in/out methods are applicable only to manage the keys within
   a cache (Storage)
 * I didn't see the keys themselves being used as names, rather I see
   this on line
   https://github.com/web2py/web2py/blob/master/gluon/cache.py#L321,
   where the key is joined with a parent path.

This is the reason why I decided to add the key prefix code only in the replace* method, and nowhere else. I tested this locally (manually testing with my sample app), to see if the cache contents are retrieved correctly. And then used the http://127.0.0.1:8000/myapp/appadmin/ccache to inspect the cache, and also remove keys from it. It seemed to work fine.
Am I missing something?

________________________________________
Kiran Subbaraman
http://subbaraman.wordpress.com/about/

On Tue, 20-01-2015 7:08 PM, Leonel Câmara wrote:
Great detective work Kiran. No wonder I couldn't reproduce it, for some reason it wasn't going over the limit for me.

Some suggestions for your pull request.

May I suggest that instead of putting the fix in *replace_windows*, you put it in *key_filter_in_windows *and then remove the prefix in *key_filter_out_windows *the reason for this is that the filenames are actually used as the keys so we need to be able to convert them to exactly the key the user put in (mainly for regex based removal from cache).

Also add some comment, something like \\?\ activates extended-length path names in NTFS. The reason this needs a comment is that this is the kind of thing no one would know the reason for in a couple of weeks. Hopefully one day it can even be removed.

Sigh NTFS...
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com <mailto:web2py+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to