Giter Club home page Giter Club logo

Comments (20)

Ocramius avatar Ocramius commented on August 30, 2024

@nosenaoki can you write a test for the file cache instead?

from assetmanager.

RWOverdijk avatar RWOverdijk commented on August 30, 2024

I recommend using the FilePathCache in stead. (Better idea performance wise).

from assetmanager.

nosenaoki avatar nosenaoki commented on August 30, 2024

@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.

nosenaoki avatar nosenaoki commented on August 30, 2024

@RWOverdijk thank you for your suggestion. I'll try to use the FilePathCache.

from assetmanager.

Ocramius avatar Ocramius commented on August 30, 2024

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.

nosenaoki avatar nosenaoki commented on August 30, 2024

@Ocramius ,

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.

RWOverdijk avatar RWOverdijk commented on August 30, 2024

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.

spiffyjr avatar spiffyjr commented on August 30, 2024

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.

RWOverdijk avatar RWOverdijk commented on August 30, 2024

I haven't had time to look into this. Has anyone been able to fix this?

from assetmanager.

mabuzagu avatar mabuzagu commented on August 30, 2024

+1 I am experiencing the same problem using APC cache

from assetmanager.

RWOverdijk avatar RWOverdijk commented on August 30, 2024

I will research this as soon as I find the time.

from assetmanager.

nosenaoki avatar nosenaoki commented on August 30, 2024

@RWOverdijk I can send a pull request to fix this problem.

from assetmanager.

RWOverdijk avatar RWOverdijk commented on August 30, 2024

@nosenaoki That would be even better. Have you identified the problem?

from assetmanager.

nosenaoki avatar nosenaoki commented on August 30, 2024

@RWOverdijk Yes, In my local envirnment, I confirm this problem is disappeared by adding just one line.

from assetmanager.

RWOverdijk avatar RWOverdijk commented on August 30, 2024

@nosenaoki In that case, yes please submit a PR :)

from assetmanager.

akomm avatar akomm commented on August 30, 2024

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.

RWOverdijk avatar RWOverdijk commented on August 30, 2024

@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.

exptom avatar exptom commented on August 30, 2024

I have encountered the same bug and can confirm that #92 fixes the issue.

from assetmanager.

eggnaube avatar eggnaube commented on August 30, 2024

As exptom, I also can confirm that #92 fixes the issue. (Using APC Cache)

from assetmanager.

nosenaoki avatar nosenaoki commented on August 30, 2024

I'm still working on thie issue. Please wait 1 or 2 days more. I'm sorry for late.

from assetmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.