Skip to content

Cache DeviceAccountPair in workers #899

@pims

Description

@pims
    final LoadingCache<String, List<DeviceAccountPair>> pairs = CacheBuilder.newBuilder()
            .maximumSize(1000)
            .expireAfterAccess(10, TimeUnit.MINUTES)
            .build(new CacheLoader<String, List<DeviceAccountPair>>() {
                        public List<DeviceAccountPair> load(String key) throws Exception {
                            return deviceDAO.getAccountIdsForDeviceId(key);
                        }});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions