Skip to content

Commit

Permalink
feature(api): expose max cache time in protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
heapwolf committed Jul 19, 2024
1 parent f693911 commit 1214fac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/latica/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ async function api (options = {}, events, dgram) {

bus.query = (...args) => _peer.query(...args)

bus.MAX_CACHE_TTL = CACHE_TTL

const pack = async (eventName, value, opts = {}) => {
if (typeof eventName !== 'string') throw new Error('event name must be a string')
if (eventName.length === 0) throw new Error('event name too short')
Expand Down

0 comments on commit 1214fac

Please sign in to comment.