Hi Michal,

On Jul 26, 2009, at 10:06 PM, Michal Charemza wrote:

On 26 Jul 2009, at 10:50, Michal Charemza wrote:
One thing that I have come across a few times is wanting to generate
URLs relative to the base href of a site rather than relative to the
document root.

I have found another use for this, relating to caching (although I'm a
bit of a newbie with the caching thing...)

- I have two directories: 'dev' and 'pub' where one loads the
development environment and one production. So I have two 'sites'
running off the same app:

http://localhost/somedir/pub/
http://localhost/somedir/dev/

In each, routing generates urls are generated that relative to the
document root:

/somedir/pub/myroute/
/somedir/dev/myroute/

If I view a page in 'dev' that has a view that generates some URLs,
these views are cached. If I then switch to the 'pub' view of that
page, the page is retrieved from cache, but still has the 'dev' URLs
in it.

I can workaround this. Although I've not found an 'environment' source
for caching, I can use configuration_directive, and in index.php set a
configuration directive to keep the environments separate, but this
seems a bit of a hack.... is there another way?

It is not recommended that you have two public directories for two environments in the same working copy. The standard practice would be to have two working copies, one for each env. However, if you wish to keep this setup you can specify the cache directory by setting the 'core.cache_dir' directive before the bootstrap call, that way at least the caches don't interfere.

felix

--
Felix Gilcher

Bitextender GmbH
Paul-Heyse-Str. 6
D-80336 München

T: +49 89 57 08 15 16
F: +49 89 57 08 15 17
M: +49 172 840 88 28

[email protected]
http://bitextender.com/

Amtsgericht München, HRB 174280
Geschäftsführer: David Zülke, Florian Clever

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to