docs: general fixes across docs (#4737)

* docs: general fixes across docs

* added deploy button to railway

* fix eslint errors

* fixes
This commit is contained in:
Shahed Nasser
2023-08-10 11:44:20 +03:00
committed by GitHub
parent f8d3d5f91a
commit 2363a5324e
9 changed files with 99 additions and 44 deletions

View File

@@ -30,11 +30,11 @@ You can refer to the [Project Preparation step in the Create Module documentatio
## Step 1: Create the Service
Create the file `services/memcached-cache.ts` which will hold your cache service. Note that the name of the file is recommended to be in the format `<service_name>-cache`. So, if youre not integrating `memcached`, you should replace the name with whats relevant for your module.
Create the file `src/services/memcached-cache.ts` which will hold your cache service. Note that the name of the file is recommended to be in the format `<service_name>-cache`. So, if youre not integrating `memcached`, you should replace the name with whats relevant for your module.
Add the following content to the file:
```ts title=services/memcached-cache.ts
```ts title=src/services/memcached-cache.ts
import { ICacheService } from "@medusajs/types"
class MemcachedCacheService implements ICacheService {
@@ -201,12 +201,14 @@ class MemcachedCacheService implements ICacheService {
After implementing the cache service, you must export it so that the Medusa backend can use it.
Create the file `index.ts` with the following content:
Create the file `src/index.ts` with the following content:
```ts title=index.ts
```ts title=src/index.ts
import { ModuleExports } from "@medusajs/modules-sdk"
import { MemcachedCacheService } from "./services"
import {
MemcachedCacheService,
} from "./services/memcached-cache"
const service = MemcachedCacheService
@@ -235,7 +237,7 @@ module.exports = {
modules: {
// ...
cacheService: {
resolve: "path/to/custom-module",
resolve: "path/to/custom-module/src/index.ts",
options: {
// any necessary options
ttl: 30,