refactor(cache): remove unused elements in Cache's script
This commit is contained in:
parent
85da82cd70
commit
e0bcdb6dd3
@ -3,7 +3,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Ref, ref } from 'vue';
|
|
||||||
import { Observable, of } from 'rxjs';
|
import { Observable, of } from 'rxjs';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -40,7 +39,6 @@ const storeInCache = (data: Observable<any>, name: string): Observable<any> => {
|
|||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
const dataFromCache: Ref<Observable<any>> = ref(null);
|
|
||||||
if (isDataOutdated(props.name)) {
|
if (isDataOutdated(props.name)) {
|
||||||
emits('cached', storeInCache(props.callback(), props.name));
|
emits('cached', storeInCache(props.callback(), props.name));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user