Skip to content
Snippets Groups Projects
Unverified Commit 56ed43e1 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Show caching controls only for questions (#23784)

parent d7ca8c9f
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,10 @@ export const QuestionInfoSidebar = ({
const description = question.description();
const isDataset = question.isDataset();
const isPersisted = isDataset && question.isPersisted();
const showCaching =
PLUGIN_CACHING.isEnabled() && MetabaseSettings.get("enable-query-caching");
const isCachingAvailable =
!isDataset &&
PLUGIN_CACHING.isEnabled() &&
MetabaseSettings.get("enable-query-caching");
const handleSave = (description: string | null) => {
if (question.description() !== description) {
......@@ -63,7 +64,7 @@ export const QuestionInfoSidebar = ({
</ContentSection>
)}
{showCaching && (
{isCachingAvailable && (
<ContentSection extraPadding>
<PLUGIN_CACHING.QuestionCacheSection
question={question}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment