PyXLL The Python Excel Add-In
  • Product
    • Features
    • Get Started
    • Request Demo
    • Download
  • Pricing
  • Resources
    • Documentation
    • Blog
    • Videos
    • FAQ
    • Learn Python
    • Customer Portal
    • About Us
  • Support
    • Documentation
    • Videos
    • FAQ
    • Contact Us
  • Contact Us
Table of Contents
  • PyXLL Documentation
  • Introduction to PyXLL
  • User Guide
  • Video Guides and Tutorials
  • API Reference
    • Worksheet Functions
    • Real Time Data
    • Macro Functions
    • Type Conversion
    • Ribbon Functions
    • Menu Functions
    • Plotting
    • Custom Task Panes
    • ActiveX Controls
    • Cell Formatting
    • Tables
    • Errors and Exceptions
    • Utility Functions
    • LRU Cache
      • lru_cache_info
      • lru_cache_clear
    • Event Handlers
    • Excel C API Functions
  • What’s new in PyXLL 5
  • Changelog
Close

LRU Cache¶

New in PyXLL 5.11

The following functions relate to PyXLL’s Least Recently Used function cache.

See Cached Functions for additional details.

  • lru_cache_info

  • lru_cache_clear

lru_cache_info¶

Returns information about functions that use the LRU cache.

lru_cache_info(function=None)

Returns a dictionary of stats for the LRU cache.

When called with a function, a dictionary with the following keys is returned if a cache for that function is found:

  • maxsize - maximum number of cached reuslts, or 0 if unbounded

  • currsize - current number of cached results

  • hits - number of times a cached result has been returned

  • misses - number of times the function was called without finding a cached result

If called with no function, a dictionary of function names to dictionaries as described above is returned for cached functions.

Parameters:

function – Function to get cache info for, or None for all cached functions.

lru_cache_clear¶

lru_cache_clear(function=None)

Clears cached result from the LRU cache.

When called with a function, cached results for that function only are cleared.

If called with no function, all cached results are cleared.

Parameters:

function – Function to clear cached results for, or None for all cached functions.

« Utility Functions
Event Handlers »
  • Home
  • Product
  • Features
  • Documentation
  • Download
  • Pricing
  • Support
  • Documentation
  • Videos
  • FAQ
  • Learn Python
  • Contact Us
  • About
  • About Us
  • Legal
  • Blog
© Copyright PyXLL Ltd