# PCSPAISetCacheSize
specify cache size in the `PCSPAI` preconditioner 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCSPAISetCacheSize(PC pc, PetscInt cache_size)
```

## Input Parameters

- ***pc -*** the preconditioner
- ***n -*** cache size {0,1,2,3,4,5} (default 5)



## Note
`PCSPAI` uses a hash table to cache messages and avoid
redundant communication. If suggest always using
5. This parameter is irrelevant in the serial
version.




## See Also
 `PCSPAI`, `PCSetType()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/spai/ispai.c.html#PCSPAISetCacheSize">src/ksp/pc/impls/spai/ispai.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/spai/ispai.c.html#PCSPAISetCacheSize_SPAI">PCSPAISetCacheSize_SPAI in src/ksp/pc/impls/spai/ispai.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/spai/ispai.c)


[Index of all PC routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
