WC_Data::generate_meta_cache_key()
Generate cache key from id and group.
Method of the class: WC_Data{}
No Hooks.
Return
String
. Meta cache key.
Usage
$result = WC_Data::generate_meta_cache_key( $id, $cache_group );
- $id(int|string) (required)
- Object ID.
- $cache_group(string) (required)
- Group name use to store cache. Whole group cache can be invalidated in one go.
Changelog
Since 4.7.0 | Introduced. |
WC_Data::generate_meta_cache_key() WC Data::generate meta cache key code WC 9.6.1
public static function generate_meta_cache_key( $id, $cache_group ) { return WC_Cache_Helper::get_cache_prefix( $cache_group ) . WC_Cache_Helper::get_cache_prefix( 'object_' . $id ) . 'object_meta_' . $id; }