It should not be creating a new folder with the name of your application -- 
rather, it should be storing the cache files inside the /cache folder that 
already exists inside your application folder. Do you have a reason for not 
wanting the files there? Note, it is not storing JSON files, but rather 
pickling Python objects.

If you really want to change the cache location, you can do the following 
(must be placed before the first time you call cache.disk -- so preferably 
early in the first model file):

import os
cache.disk.folder = os.path.join('your', 'path')

In that case, it will create the folder /your/path/cache (there's no way to 
prevent it from creating a final "cache" subfolder without some more 
involved hacking).

Anthony

On Tuesday, April 26, 2016 at 2:13:40 PM UTC-4, Antonio wrote:
>
> Hi, 
> I'm using web2py to create a json to later use on a mobile app. The thing 
> is that it takes a while to get all the information so I decided to use 
> cache.disk to have my application cache on disk.
> I just pasted this on top my function:
> @cache(request.env.path_info, time_expire=600, cache_model=cache.disk)
>
> But what this does is create a folder with the name of my application in 
> my root directory.
> I've searched everywhere for a way with which to chose where I want my 
> cache directory but I couldn't find it.
>
> ¿Is it possible to do?
> Thanks in advance.
>

-- 
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