-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How to serve file hash #99
Comments
To be honest, I have absolutely no idea. I have never used that cache type What I do know, is that it basically uses the hashes itself to find a |
Of course i will use FilePathCache for production, but FilesystemCache is good for development, as it refresh assets automatically. Maybe I should use aliases, but I didn't find any doc. |
Just use the path you'd normally use, the hash key is used by the cache |
OK for using FilePathCache in production. The cache in production should be : 'caching' => array(
'default' => array(
'cache' => 'FilePathCache',
'options' => array(
'dir' => 'public',
),
),
), then my file will be under But if I change for FilesystemCache, the hashed file will be under Eventuallly, I would change the config for development : 'caching' => array(
'default' => array(
'cache' => 'Filesystem',
'options' => array(
'dir' => 'data/cache',
),
),
), So in conclusion, I think that the cache configuration should go under The default .gitignore strategy will ignore this config and it will become environment-dependent. It may be worth to say a word about this in the doc ? |
We could do that. That might not be the worst idea :) |
@jmleroux that's absolutely for |
The way I use this module, I split the config :
|
Hello,
I'm using the FilesystemCache for my assets but i don't know how to get the resulting hash to use it in my view template.
My asset (a css file foo.css), is hashed and i can view it in public/assets/application/808cc956bac63457eb33ca3edd9a4949.
Isn't this the right way to use assets in view layout ?
Output
but i want something like this :
The text was updated successfully, but these errors were encountered: