Cmdlets for SugarCRM

Build 24.0.9175

CacheMetadata Parameter (Connect-SugarCRM Cmdlet)

Determines whether the provider caches table metadata to a file-based cache database.

Syntax

Connect-SugarCRM -CacheMetadata SwitchParameter

Data Type

bool

Default Value

false

Remarks

When this connection property is set to True, as you execute queries, table metadata in the SugarCRM catalog is cached to the cache database specified by CacheConnection and CacheProvider, or, if those connection properties are not set, to the user's home directory.

The location of your home directory varies by platform:

PlatformHome Directory
Windows %APPDATA%\\CData\\SugarCRM Data Provider
Mac ~/Library/Application Support/CData/SugarCRM Data Provider
Unix ~/.config/CData/SugarCRM Data Provider

A table's metadata is retrieved only once, when the table is queried for the first time.

When to Use CacheMetadata

When there are a large number of SugarCRM tables and columns for the cmdlet to retrieve during metadata discovery, the cmdlet may take a while to list all table metadata.

You may experience slow metadata retrieval when:

  • Your SugarCRM instance naturally has a large table count.
  • The cmdlet has been configured, via its connection properties, to discover more tables than it would under its default configuration.
  • You make many short-lived connections to the cmdlet.
With CacheMetadata enabled, all retrieved metadata is mirrored in the cache database. This means that any subsequent attempts by the cmdlet to discover metadata are much faster, as this metadata is then read directly from the cache database, without needing to spend time requesting metadata from SugarCRM.

When Not to Use CacheMetadata

The cmdlet automatically persists metadata in memory for up to an hour when you first discover the metadata for a table or view, so CacheMetadata is generally not necessary.

CacheMetadata is not ideal in scenarios where you are working with volatile metadata. The first time you query a table, the cmdlet caches its metadata to the cache database file. This cache is not dynamically updated to reflect updates to the table schema, so you must delete and rebuild the cache database file to pick up new, changed, or deleted columns.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 24.0.9175