Class: BucketProxy

BucketProxy

new BucketProxy()

Caches a copy of inserted links to reduce time in bucket creation.
Author:
Source:

Members

(private, inner) cache_limit :number

Represents max cache size.
Type:
  • number
Source:

(private, inner) count_store :Object

Stores count of urls in domains and various levels.
Type:
  • Object
Source:

(private, inner) current_size :number

Represents current size of cache.
Type:
  • number
Source:

(private, inner) store :Object

Urls are stored in it. Key is domain and each domain has another json with keys representing levels and each level has an Immutable Set of urls.
Type:
  • Object
Source:

Methods

fetchURLs(domain, num)

Fetches urls from the cache.
Parameters:
Name Type Description
domain String Domain required
num number number of urls to return
Source:

pushURL(url) → {boolean}

Pushes a url in the cache.
Parameters:
Name Type Description
url Url
Source:
Returns:
-status of insertion
Type
boolean