Skip to content
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

Return 304 code during a hour #130

Closed
wants to merge 4 commits into from

Conversation

guilherme-santos
Copy link

Actually If I can get the path (like $assetManager->getAssetPath()) I'll get the modified time using filemtime(), it'll compare and return right LastModified... And the cache will work better, not only for a hour.

@guilherme-santos
Copy link
Author

I made other changes it's for me works good like that!

@Ocramius
Copy link
Contributor

I'm not sure if this should be handled by AM...

The idea is neat, but I see a couple of possible improvements

  • make it a separate listener
  • make it opt-in (to be enabled on demand)

@guilherme-santos
Copy link
Author

If asset manager serve files why shouldn't it handle cache to browser?

@Ocramius
Copy link
Contributor

@guilherme-santos that would only be acceptable if we had cache invalidation as well (which we don't right now)...

Caching should be handled via the file cache or varnish or similars...

@RWOverdijk
Copy link
Owner

@guilherme-santos The recommended way of dealing with this is varnish. You use the asset manager to make sure lookup, and bundling assets with modules is possible. You use varnish to handle actual serving and caching.

The reason for this is that this module doesn't do what you want yet. And seeing how almost nobody seems to need it it hasn't been contributed either.

@guilherme-santos
Copy link
Author

I don't understand, actually (as a client) I need the files are served, to fix the limitation of zendframework, that all files should be in main public folder, you create this module... I think this module should be transparent to client, it should be like a apache serving it... I don't know why it's not good implement this logic here..!

@Ocramius I don't understand what you mean invalidation cache?

@RWOverdijk
Copy link
Owner

@guilherme-santos In all fairness I do agree that this module should handle that. But at this point it doesn't, and I don't think that breaking BC is the solution. We've already been discussing a v2, perhaps I can create a branch for that and have BC-breaking PRs be pointed there. I'd first open this up for discussion, what do you think?

@guilherme-santos
Copy link
Author

For me it's ok! Thanks ;)

@RWOverdijk
Copy link
Owner

#132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants