Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] LTW: aspectj 1.7, caching weaving code. Needs clarifications

I presume this is because there is no other way to empty it (other than a manual 'rm') - because if you want to simulate the cache being cleared on every start you can just run without the caching params set to enable it...  I think adding this option is reasonable to at least have some way to clear it through AspectJ. If you are using the same aspects everywhere in your system, there are further cache optimizations to make things really quick as cached results computed by one classloader are used by others (this doesn't work if different classloaders will be seeing different sets of aspects).

Andy


On 29 December 2012 09:10, Pasturel <jean-louis.pasturel@xxxxxxxxx> wrote:
Since AspectJ 1.7.0+, we can enable LTW byte-code  caching by using the 2 system properties :

    -Daj.weaving.cache.enabled=true
    -Daj.weaving.cache.dir=/tmp/aspectj-cache/ ( for DefaultFileCacheBacking implementation )

as bug report says, this caching is interesting, when the cache is filled at the first startup,  for the next start-up (faster), and also memory consumption.

I have a request, for the case of changing the LTW Aspect between 2 startup ( development, stressing tests ...) , to have the possibility of cleaning the cache at every start up by adding and coding for example
-Daj.weaving.cache.cleanatstartup=true ( false by default)
Does it make sense ?

I wasted time to find why i raised NPE exception for an old LTW aspect !! Cleaning the cache solved the problem.

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top