Thank you for your time.
I think the cache clear event is the way to go. Imagine the dimension
depends on $_SERVER['HTTP_HOST']. The whole project can be called from
multiple domains (multiple "clients"). Every client needs his own
configuration etc. So i set this dimension (cache folder) in
sfApplicationConfiguration->configure(). This works perfectly.
The problem is, when called from cli ("smyfony cc"), no
$_SERVER['HTTP_HOST'] is present, so no dimension is set, which
explains why only the standard app folders are cleared. The other
thing is, the sfCacheClearTask iterates only through apps and then
through enviroments (two "foreach" loops). In case of dimensions
(multiple domains), this command should first iterate dimensions, and
then apps, and then envs (three or more loops). But i understand this
is not possible.
Should this task simply clear "every" folder inside the cache folder,
and not only the present apps? Is there a reason to check and clear
only existing applications?
Now for ysfDimensionPlugin this is not a problem, as in prod mode
everything is saved in opcode cacher. The only thing i had to remember
is to do a "symfony cc" AND to clear manually the opcode cacher, for
the symfoy cmd didn't do it.
The ticket for sfXCacheCache: http://trac.symfony-project.org/ticket/4115
There is a "hack" for the TTL option which i suspect to mess up the
the saved data. This happens in prod env, as for dev no opcode cacher
is used. When i remove this "hack", everything works fine.
Thank you for any help,
Michael Piecko
On 24 Sep., 21:35, Dustin Whittle <[EMAIL PROTECTED]>
wrote:
> Michael,
>
> What is the ticket # for sfXCacheCache issue? Also, if you override the
> configuration paths via sfApplicationConfiguration, then it should just
> work. Otherwise, you need to listen to the cache clear event and add your
> own method to delete cache files.
>
> Cheers,
>
> Dustin
>
> On 9/24/08 12:52 AM, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
>
> > Dear Dustin,
>
> > i wrote a "light" version of your plugin because it didn't work with
> > my xcache installation (i created a ticket for sfXCacheCache some time
> > ago) and i just needed the functionality for my configs (database
> > etc.). Depending on the requested domain, a different "dimension"
> > folder is created inside the cache folder. This works perfectly, and i
> > thank you for all your work that i learned from.
>
> > I have now problems with the cc command, because it does only iterate
> > the app folders, but not the custom "dimension" folder. I had this
> > issue also with the dimension plugin. The cache folder looks like
> > this:
>
> > cache/
> > backend/
> > ...
> > demo/
> > backend/
> > ...
> > frontend/
> > ...
> > frontend/
> > ...
>
> > The custom cache folder is only created, when a $_SERVER['HTTP_HOST']
> > is set, because in cli we have no domain requested. So when i launch
> > the cc command, everything is cleared, but not the "demo" folder in
> > this example.
>
> > I would appreciate any hint or tip, how to force the cc command to
> > recognize this "dimensions".
>
> > Thanks,
> > Michael
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---