File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 18
18
*/
19
19
class AnnotationManager
20
20
{
21
+ const CACHE_FORMAT_VERSION = 3 ;
22
+
21
23
const MEMBER_CLASS = 'class ' ;
22
24
23
25
const MEMBER_PROPERTY = 'property ' ;
@@ -193,7 +195,8 @@ protected function getAnnotationFile($path)
193
195
$ code = $ this ->getParser ()->parseFile ($ path );
194
196
$ data = eval ($ code );
195
197
} else {
196
- $ key = basename ($ path ) . '- ' . sprintf ('%x ' , crc32 ($ path . $ this ->_cacheSeed ));
198
+ $ checksum = crc32 ($ path . ': ' . $ this ->_cacheSeed . ': ' . self ::CACHE_FORMAT_VERSION );
199
+ $ key = basename ($ path ) . '- ' . sprintf ('%x ' , $ checksum );
197
200
198
201
if (($ this ->cache ->exists ($ key ) === false ) || (filemtime ($ path ) > $ this ->cache ->getTimestamp ($ key ))) {
199
202
$ code = $ this ->getParser ()->parseFile ($ path );
You can’t perform that action at this time.
0 commit comments