P
P
photosho2019-07-31 22:08:50
1C-Bitrix
photosho, 2019-07-31 22:08:50

How to cache a component in D7?

What function has come to replace "$this->startResultCache()" for component caching in D7? I'm writing component code in class.php and the above function refuses to be cached. Maybe I'm misunderstanding something?

if ($this->startResultCache())
    $this->arResult[...] = ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dcode, 2019-08-01
@dcode

Perhaps you forgot to write extends \CBitrixComponent in the class. But in general, you can always use "cleaner" caching through \Bitrix\Main\Data\Cache and tagged cache.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question