• Iustin Pop's avatar
    Cache some jobs in memory · ac0930b9
    Iustin Pop authored
    This patch adds a caching mechanisms to the JobStorage. Note that is
    does not make the memory cache authoritative.
    
    The algorithm is:
      - all jobs loaded from disks are entered in the cache
      - all new jobs are entered in the cache
      - at each job save (in UpdateJobUnlocked), jobs which are not
        executing or queued are removed from the cache
    
    The end effect is that running jobs will always be in the cache (which
    will fix the opcode log changes) and finished jobs will be kept for a
    while in the cache after being loaded.
    
    Reviewed-by: imsnah
    ac0930b9
jqueue.py 13.1 KB