[Fontconfig] Re: Structure of cache files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthias Clasen wrote:
>>Oops, you're right.  How about this: when we find that the cache is
>>invalidated on any platform, we remove all stale sections from other
>>platforms.  That ought to be sufficient to avoid staleness (safety).  Of
>>course, an update to a file which is not stale preserves existing
>>sections (liveness).  With this solution, in order to fully update cache
>>files, you'll have to run fc-cache on all relevant platforms once, which
>>is the best we can do (without cross-platform cache creation) anyway.
> 
> Sounds like it should work well enough (since fonts are not installed
> with high frequency...)

I just committed a patch which unlinks the file if it's stale; if it's
not stale but just lacking a section, then it adds the section to the
cache.  So I reverted the patch to FcDirCacheValid and added
FcDirCacheHasCurrentArch.

So, if FcDirCacheValid && FcDirCacheHasCurrentArch, then skip.

Otherwise, !FcDirCacheValid || !FcDirCacheHasCurrentArch.  If
!FcDirCacheValid (ie stale), then unlink.  In all cases, continue by
saving the cache.

pat



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux