Comments (20)
@nosenaoki can you write a test for the file cache instead?
from assetmanager.
I recommend using the FilePathCache in stead. (Better idea performance wise).
from assetmanager.
@Ocramius Thank you for your reply.
First, I apologies to you for my mistake. In my first post, I drop 'caching' key from configuration mistakenly.
I have alredy fixed it. Could you check it once more?
Writing a test for reproducing this problem is not so simple, because this is not a problem caused only by
file cache.A little while ago, I've try to use apc cache, and the same problem reproduces.
when I debugged the code,I found that getCacheKey method of AssetCache
returns same cache key for different assets.
The cache key is produced using properties of asset.
So, I think that The cause of the problem is AssetCollection does'nt provide sufficient properties to create cacheKey.
To test this, writing a test for a single class is insufficeint. I need to write test that test some combination of the services. I can try that if you wich, but it takes some time.
What will we do now?
from assetmanager.
@RWOverdijk thank you for your suggestion. I'll try to use the FilePathCache.
from assetmanager.
Looks like this is the typical problem based on hashing cache keys (dangerous practice!) then. @nosenaoki are you sure this isn't to be handled in assetic itself?
from assetmanager.
This problem may be resolved by using assetic AssetFactory Instead of creating new instance of AssetCollection directly. But I've not tried that idea yet.
Another idea is to set additional properties(like target path) after creating AssetCollection manually.
I tried this, and It seems to work well. But I don't sure this cause any side effects which break other functionality.
from assetmanager.
It might be word investigating if the cache dir is actually being used. Al;so, make sure it's not assetic. It could very well be that there's a bug in it. Otherwise it might be that they've updated it and the assetmanager is out of date.
from assetmanager.
I experienced this too and while FilePath is nice for production FileSystem is preferred for dev. Unfortunately, I didn't really investigate further. Fix all teh things!
from assetmanager.
I haven't had time to look into this. Has anyone been able to fix this?
from assetmanager.
+1 I am experiencing the same problem using APC cache
from assetmanager.
I will research this as soon as I find the time.
from assetmanager.
@RWOverdijk I can send a pull request to fix this problem.
from assetmanager.
@nosenaoki That would be even better. Have you identified the problem?
from assetmanager.
@RWOverdijk Yes, In my local envirnment, I confirm this problem is disappeared by adding just one line.
from assetmanager.
@nosenaoki In that case, yes please submit a PR :)
from assetmanager.
Looks like something is messed up even more. Now no matter which cache i use, My collections are messed up. Like the autor explained, i get same result for different asset collections. My *.js collection contains css from another .css collection. I was just like "WTF" when i cloned a project and installed the dependencies with composer and suddenly nothing worked.
from assetmanager.
@Ysor It sounds like you're experiencing a different issue. If you could open a new issue with a description that would help :)
from assetmanager.
I have encountered the same bug and can confirm that #92 fixes the issue.
from assetmanager.
As exptom, I also can confirm that #92 fixes the issue. (Using APC Cache)
from assetmanager.
I'm still working on thie issue. Please wait 1 or 2 days more. I'm sorry for late.
from assetmanager.
Related Issues (20)
- Support for EventManager & ServiceManager 3.0 HOT 6
- Append last modified date to Asset View Helper even withoud cache HOT 5
- FilePathCache throws exceptions almost every release HOT 13
- AssetManager is not installable with new skeleton application HOT 8
- PHP Fatal error: Uncaught TypeError: Argument 2 passed to AssetManager\Service\AssetCacheManager::setCache() must implement interface Assetic\Asset\AssetInterface, null given HOT 8
- Bower components and image paths HOT 2
- Wrong MIME type when converting asset HOT 2
- Asset not loaded on latest ZendSkeletonFramework HOT 2
- How to create a resolver that remap extension? HOT 4
- Create Seperate "Core" repository and package HOT 8
- Caching/Processing assets without asset() view helper HOT 3
- node: Permission denied HOT 1
- How to add a response header - Last-Modified, E-Tag HOT 1
- unable to load AssetManager HOT 1
- Asset view helper not work with ZF3 with basic documentation configuration. ZF3 use his own Asset view helper. HOT 1
- asset view helper BC HOT 10
- Can't install via composer due to version locks HOT 18
- Composer Version 2x HOT 1
- packagist versions not auto updated HOT 3
- laminas/laminas-dependency-plugin HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from assetmanager.