Skip to main content
edited tags
Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237
added 4 characters in body
Source Link
nz_21
  • 1k
  • 5
  • 19

As it stands, the introduction of the cache makes the code quite ugly (in my opinion). I'd like to refactor it so that I have only one cache usage that applies in both situations -- something like a Python decorator.

As it stands, the introduction of the cache makes the code quite ugly (in my opinion). I'd like to refactor it so that I have only cache usage that applies in both situations -- something like a Python decorator.

As it stands, the introduction of the cache makes the code quite ugly (in my opinion). I'd like to refactor it so that I have only one cache usage that applies in both situations -- something like a Python decorator.

edited body; edited title
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

Nodejs: how to write python Python-like decorators for caching?

I am building an ad-hoc text-editor. I have two functions which use a cache, provideHover and provideCompletionItems.

As it stands, the introduction of the cache makes the code quite ugly (in my opinion). I'd like to refactor it so that I have only cache usage that applies in both situations -- something like a pythonPython decorator.

Nodejs: how to write python-like decorators for caching?

I am building an ad-hoc text-editor. I have two functions which use a cache, provideHover and provideCompletionItems

As it stands, the introduction of the cache makes the code quite ugly (in my opinion). I'd like to refactor it so that I have only cache usage that applies in both situations -- something like a python decorator.

Python-like decorators for caching

I am building an ad-hoc text-editor. I have two functions which use a cache, provideHover and provideCompletionItems.

As it stands, the introduction of the cache makes the code quite ugly (in my opinion). I'd like to refactor it so that I have only cache usage that applies in both situations -- something like a Python decorator.

Source Link
nz_21
  • 1k
  • 5
  • 19
Loading