:param str path: The directory to load configuration files from. Each file must end in ``.conf``.
+.. function:: setSyslogFacility(facility)
+
+ .. versionadded:: 1.4.0
+
+ Set the syslog logging facility to ``facility``.
+
+ :param int facility: The new facility as a numeric value. Defaults to LOG_DAEMON.
+
Listen Sockets
~~~~~~~~~~~~~~
.. versionchanged:: 1.3.0
Added ``checkClass``, ``sockets`` and ``checkFunction`` to server_table.
- .. versionchanged:: 1.3.4
+ .. versionchanged:: 1.4.0
Added ``checkTimeout`` and ``rise`` to server_table.
Add a new backend server. Call this function with either a string::
A Pool can have a packet cache to answer queries directly in stead of going to the backend.
See :doc:`../guides/cache` for a how to.
- .. function:: newPacketCache(maxEntries[, maxTTL=86400[, minTTL=0[, temporaryFailureTTL=60[, staleTTL=60[, dontAge=false[, numberOfShards=1[, deferrableInsertLock=true[, maxNegativeTTL=3600[, parseECS=false [,options]]]]]]]]) -> PacketCache
+ .. function:: newPacketCache(maxEntries[, maxTTL=86400[, minTTL=0[, temporaryFailureTTL=60[, staleTTL=60[, dontAge=false[, numberOfShards=1[, deferrableInsertLock=true[, maxNegativeTTL=3600[, parseECS=false]]]]]]]) -> PacketCache
.. versionchanged:: 1.3.0
``numberOfShards`` and ``deferrableInsertLock`` parameters added.
.. versionchanged:: 1.3.1
``maxNegativeTTL`` and ``parseECS`` parameters added.
- .. versionchanged:: 1.3.4
- ``options`` parameter added.
+ .. deprecated:: 1.4.0
Creates a new :class:`PacketCache` with the settings specified.
- Starting with 1.3.4, all parameters can be specified in the ``options`` table, overriding the value from the existing parameters if any.
:param int maxEntries: The maximum number of entries in this cache
:param int maxTTL: Cap the TTL for records to his number
:param bool deferrableInsertLock: Whether the cache should give up insertion if the lock is held by another thread, or simply wait to get the lock
:param int maxNegativeTTL: Cache a NXDomain or NoData answer from the backend for at most this amount of seconds, even if the TTL of the SOA record is higher
:param bool parseECS: Whether any EDNS Client Subnet option present in the query should be extracted and stored to be able to detect hash collisions involving queries with the same qname, qtype and qclass but a different incoming ECS value. Enabling this option adds a parsing cost and only makes sense if at least one backend might send different responses based on the ECS value, so it's disabled by default
- :param table options: A table with key: value pairs with the options listed below:
+
+ .. function:: newPacketCache(maxEntries, [options]) -> PacketCache
+
+ .. versionadded:: 1.4.0
+
+ Creates a new :class:`PacketCache` with the settings specified.
+
+ :param int maxEntries: The maximum number of entries in this cache
Options:
.. method:: PacketCache:getStats()
- .. versionadded:: 1.3.4
+ .. versionadded:: 1.4.0
Return the cache stats (number of entries, hits, misses, deferred lookups, deferred inserts, lookup collisions, insert collisions and TTL too shorts) as a Lua table.
.. function:: showServers([options])
- .. versionchanged:: 1.3.4
+ .. versionchanged:: 1.4.0
``options`` optional parameter added
This function shows all backend servers currently configured and some statistics.